Beispiel #1
0
  def __init__(self, parent, iface, pluginBase, pluginName, pluginCommand):
      QDialog.__init__(self, parent)
      self.setAttribute(Qt.WA_DeleteOnClose)
      self.iface = iface

      self.process = QProcess(self)
      Utils.setProcessEnvironment(self.process)
      self.connect(self.process, SIGNAL("error(QProcess::ProcessError)"), self.processError)
      self.connect(self.process, SIGNAL("finished(int, QProcess::ExitStatus)"), self.processFinished)

      self.setupUi(self)
      self.arguments = []

      self.editCmdBtn.setIcon( QIcon(":/icons/edit.png") )
      self.connect(self.editCmdBtn, SIGNAL("toggled(bool)"), self.editCommand)
      self.resetCmdBtn.setIcon( QIcon(":/icons/reset.png") )
      self.connect(self.resetCmdBtn, SIGNAL("clicked()"), self.resetCommand)
      self.editCommand( False )

      self.connect(self.buttonBox, SIGNAL("rejected()"), self.reject)
      self.connect(self.buttonBox, SIGNAL("accepted()"), self.accept)
      self.connect(self.buttonBox, SIGNAL("helpRequested()"), self.help)

      self.buttonBox.button(QDialogButtonBox.Ok).setDefault(True)

      self.plugin = pluginBase
      self.connect(self.plugin, SIGNAL("valuesChanged(PyQt_PyObject)"), self.refreshArgs)

      self.pluginLayout.addWidget(self.plugin)
      self.plugin.setFocus()

      self.setWindowTitle(pluginName)
      self.setPluginCommand(pluginCommand)
Beispiel #2
0
    def __init__(self, parent, iface, pluginBase, pluginName, pluginCommand):
        QDialog.__init__(self, parent)
        self.setAttribute(Qt.WA_DeleteOnClose)
        self.iface = iface

        self.process = QProcess(self)
        Utils.setProcessEnvironment(self.process)
        self.connect(self.process, SIGNAL("error(QProcess::ProcessError)"), self.processError)
        self.connect(self.process, SIGNAL("finished(int, QProcess::ExitStatus)"), self.processFinished)

        self.setupUi(self)
        self.arguments = []

        self.editCmdBtn.setIcon(QIcon(":/icons/edit.png"))
        self.connect(self.editCmdBtn, SIGNAL("toggled(bool)"), self.editCommand)
        self.resetCmdBtn.setIcon(QIcon(":/icons/reset.png"))
        self.connect(self.resetCmdBtn, SIGNAL("clicked()"), self.resetCommand)
        self.editCommand(False)

        self.connect(self.buttonBox, SIGNAL("rejected()"), self.reject)
        self.connect(self.buttonBox, SIGNAL("accepted()"), self.accept)
        self.connect(self.buttonBox, SIGNAL("helpRequested()"), self.help)

        self.buttonBox.button(QDialogButtonBox.Ok).setDefault(True)

        self.plugin = pluginBase
        self.connect(self.plugin, SIGNAL("valuesChanged(PyQt_PyObject)"), self.refreshArgs)

        self.pluginLayout.addWidget(self.plugin)
        self.plugin.setFocus()

        self.setWindowTitle(pluginName)
        self.setPluginCommand(pluginCommand)
    def __init__(self, args):
        QObject.__init__(self)

        self.killed = False
        self.rLayer, self.vLayer, self.width, self.res, self.startElev, self.endElev, self.leftSideSlope, self.rightSideSlope, self.bankWidth, self.dirName = args
        gdalUtils.setProcessEnvironment(QObject)