Skip to content
Permalink
Browse files

[processing] load UI files dynamically

  • Loading branch information
alexbruy committed May 18, 2015
1 parent 30dbd8f commit d8e1cf30af977c435409663eadf7a9b530227cd9
Showing with 253 additions and 2,034 deletions.
  1. +1 −4 python/plugins/processing/CMakeLists.txt
  2. +1 −3 python/plugins/processing/algs/qgis/ui/CMakeLists.txt
  3. +6 −3 python/plugins/processing/algs/qgis/ui/FieldsCalculatorDialog.py
  4. +8 −4 python/plugins/processing/algs/qgis/ui/FieldsMappingPanel.py
  5. +0 −148 python/plugins/processing/algs/qgis/ui/ui_DlgFieldsCalculator.py
  6. +0 −107 python/plugins/processing/algs/qgis/ui/ui_widgetFieldsMapping.py
  7. +10 −4 python/plugins/processing/gui/AlgorithmDialogBase.py
  8. +8 −3 python/plugins/processing/gui/AutofillDialog.py
  9. +5 −5 python/plugins/processing/gui/BatchPanel.py
  10. +6 −3 python/plugins/processing/gui/ConfigDialog.py
  11. +10 −4 python/plugins/processing/gui/CrsSelectionPanel.py
  12. +8 −3 python/plugins/processing/gui/EditRenderingStylesDialog.py
  13. +10 −4 python/plugins/processing/gui/ExtentSelectionPanel.py
  14. +7 −4 python/plugins/processing/gui/FileSelectionPanel.py
  15. +8 −3 python/plugins/processing/gui/FixedTableDialog.py
  16. +8 −4 python/plugins/processing/gui/FixedTablePanel.py
  17. +9 −4 python/plugins/processing/gui/GeometryPredicateSelectionPanel.py
  18. +9 −6 python/plugins/processing/gui/GetScriptsAndModels.py
  19. +8 −3 python/plugins/processing/gui/HelpEditionDialog.py
  20. +10 −4 python/plugins/processing/gui/HistoryDialog.py
  21. +6 −5 python/plugins/processing/gui/InputLayerSelectorPanel.py
  22. +9 −5 python/plugins/processing/gui/MessageDialog.py
  23. +6 −3 python/plugins/processing/gui/MultipleFileInputDialog.py
  24. +8 −3 python/plugins/processing/gui/MultipleInputDialog.py
  25. +9 −4 python/plugins/processing/gui/MultipleInputPanel.py
  26. +8 −3 python/plugins/processing/gui/NumberInputDialog.py
  27. +10 −4 python/plugins/processing/gui/NumberInputPanel.py
  28. +9 −5 python/plugins/processing/gui/OutputSelectionPanel.py
  29. +5 −4 python/plugins/processing/gui/ParametersPanel.py
  30. +10 −5 python/plugins/processing/gui/ProcessingToolbox.py
  31. +8 −4 python/plugins/processing/gui/RangePanel.py
  32. +9 −5 python/plugins/processing/gui/RenderingStyleFilePanel.py
  33. +9 −4 python/plugins/processing/gui/ResultsDialog.py
  34. +6 −4 python/plugins/processing/gui/ScriptEditorDialog.py
  35. +6 −6 python/plugins/processing/modeler/ModelerDialog.py
  36. +3 −0 python/plugins/processing/ui/CMakeLists.txt
  37. +0 −26 python/plugins/processing/ui/__init__.py
  38. +0 −24 python/plugins/processing/ui/convert.py
  39. +0 −91 python/plugins/processing/ui/ui_DlgAlgorithmBase.py
  40. +0 −72 python/plugins/processing/ui/ui_DlgAutofill.py
  41. +0 −57 python/plugins/processing/ui/ui_DlgConfig.py
  42. +0 −51 python/plugins/processing/ui/ui_DlgFixedTable.py
  43. +0 −93 python/plugins/processing/ui/ui_DlgGetScriptsAndModels.py
  44. +0 −89 python/plugins/processing/ui/ui_DlgHelpEdition.py
  45. +0 −58 python/plugins/processing/ui/ui_DlgHistory.py
  46. +0 −49 python/plugins/processing/ui/ui_DlgMessage.py
  47. +0 −161 python/plugins/processing/ui/ui_DlgModeler.py
  48. +0 −52 python/plugins/processing/ui/ui_DlgMultipleSelection.py
  49. +0 −65 python/plugins/processing/ui/ui_DlgNumberInput.py
  50. +0 −61 python/plugins/processing/ui/ui_DlgRenderingStyles.py
  51. +0 −61 python/plugins/processing/ui/ui_DlgResults.py
  52. +0 −153 python/plugins/processing/ui/ui_DlgScriptEditor.py
  53. +0 −57 python/plugins/processing/ui/ui_ProcessingToolbox.py
  54. +0 −47 python/plugins/processing/ui/ui_widgetBaseSelector.py
  55. +0 −69 python/plugins/processing/ui/ui_widgetBatchPanel.py
  56. +0 −71 python/plugins/processing/ui/ui_widgetGeometryPredicateSelector.py
  57. +0 −53 python/plugins/processing/ui/ui_widgetLayerSelector.py
  58. +0 −51 python/plugins/processing/ui/ui_widgetNumberSelector.py
  59. +0 −64 python/plugins/processing/ui/ui_widgetParametersPanel.py
  60. +0 −72 python/plugins/processing/ui/ui_widgetRangeSelector.py
@@ -8,12 +8,9 @@ ADD_SUBDIRECTORY(modeler)
ADD_SUBDIRECTORY(script)
ADD_SUBDIRECTORY(tools)
ADD_SUBDIRECTORY(tests)

FILE(GLOB UI_FILES ui/*.ui)
PYQT4_WRAP_UI(PYUI_FILES ${UI_FILES})
ADD_SUBDIRECTORY(ui)

FILE(GLOB OTHER_FILES metadata.txt)
FILE(GLOB PY_FILES *.py)

PLUGIN_INSTALL(processing . ${PY_FILES} ${OTHER_FILES})
PLUGIN_INSTALL(processing ui ${PYUI_FILES} ui/__init__.py)
@@ -1,6 +1,4 @@
FILE(GLOB PY_FILES *.py)

FILE(GLOB UI_FILES *.ui)
PYQT4_WRAP_UI(PYUI_FILES ${UI_FILES})

PLUGIN_INSTALL(processing ./algs/qgis/ui ${PY_FILES} ${PYUI_FILES})
PLUGIN_INSTALL(processing ./algs/qgis/ui ${PY_FILES} ${UI_FILES})
@@ -28,6 +28,7 @@
import os
import re

from PyQt4 import uic
from PyQt4.QtCore import Qt, QSettings
from PyQt4.QtGui import QDialog, QFileDialog, QApplication, QCursor, QMessageBox
from qgis.gui import QgsEncodingFileDialog
@@ -38,12 +39,14 @@
from processing.tools import dataobjects
from processing.gui.Postprocessing import handleAlgorithmResults

from ui_DlgFieldsCalculator import Ui_FieldsCalculator
pluginPath = os.path.dirname(__file__)
WIDGET, BASE = uic.loadUiType(
os.path.join(pluginPath, 'DlgFieldsCalculator.ui'))


class FieldsCalculatorDialog(QDialog, Ui_FieldsCalculator):
class FieldsCalculatorDialog(BASE, WIDGET):
def __init__(self, alg):
QDialog.__init__(self)
super(FieldsCalculatorDialog, self).__init__(None)
self.setupUi(self)

self.executed = False
@@ -25,17 +25,21 @@

__revision__ = '$Format:%H$'

import os

from collections import OrderedDict

from PyQt4 import uic
from PyQt4 import QtCore, QtGui

from qgis.core import QgsExpression
from qgis.gui import QgsFieldExpressionWidget

from processing.tools import dataobjects

from .ui_widgetFieldsMapping import Ui_Form
pluginPath = os.path.dirname(__file__)
WIDGET, BASE = uic.loadUiType(
os.path.join(pluginPath, 'widgetFieldsMapping.ui'))


class FieldsMappingModel(QtCore.QAbstractTableModel):
@@ -45,7 +49,7 @@ class FieldsMappingModel(QtCore.QAbstractTableModel):
(QtCore.QVariant.Double, "Double"),
(QtCore.QVariant.String, "String"),
(QtCore.QVariant.DateTime, "Date"),
(QtCore.QVariant.LongLong, "Double"),
(QtCore.QVariant.LongLong, "Double"),
(QtCore.QVariant.Date, "Date")])

columns = [
@@ -297,10 +301,10 @@ def on_expression_fieldChange(self, fieldName):
self.commitData.emit(self.sender())


class FieldsMappingPanel(QtGui.QWidget, Ui_Form):
class FieldsMappingPanel(BASE, WIDGET):

def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
super(FieldsMappingPanel, self).__init__(parent)
self.setupUi(self)

self.addButton.setIcon(

This file was deleted.

This file was deleted.

@@ -25,16 +25,22 @@

__revision__ = '$Format:%H$'

import os

from PyQt4 import uic
from PyQt4.QtCore import QCoreApplication, QUrl
from PyQt4.QtGui import QDialog, QApplication, QDialogButtonBox
from PyQt4.QtGui import QApplication, QDialogButtonBox

from qgis.utils import iface

from processing.core.ProcessingConfig import ProcessingConfig
from processing.ui.ui_DlgAlgorithmBase import Ui_Dialog

pluginPath = os.path.split(os.path.dirname(__file__))[0]
WIDGET, BASE = uic.loadUiType(
os.path.join(pluginPath, 'ui', 'DlgAlgorithmBase.ui'))


class AlgorithmDialogBase(QDialog, Ui_Dialog):
class AlgorithmDialogBase(BASE, WIDGET):

class InvalidParameterValue(Exception):

@@ -43,7 +49,7 @@ def __init__(self, param, widget):


def __init__(self, alg):
QDialog.__init__(self, iface.mainWindow())
super(AlgorithmDialogBase, self).__init__(iface.mainWindow())
self.setupUi(self)

self.executed = False

0 comments on commit d8e1cf3

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