Skip to content
Permalink
Browse files

[processing] added selectionChanged signal to MultipleInputPanel

linked signal with GdalAlgorithmDialog
  • Loading branch information
volaya committed Jan 6, 2016
1 parent 1f22b43 commit 943b1015014e56c5b873e0446884a9c08b842c1d
@@ -1,8 +1,8 @@

from PyQt4.QtGui import *
from processing.gui.AlgorithmDialog import AlgorithmDialog
from processing.gui.AlgorithmDialogBase import AlgorithmDialogBase
from processing.gui.ParametersPanel import ParametersPanel
from processing.gui.MultipleInputPanel import MultipleInputPanel


class GdalAlgorithmDialog(AlgorithmDialog):
@@ -57,6 +57,8 @@ def connectParameterSignals(self):
w.currentIndexChanged.connect(self.parametersHaveChanged)
elif isinstance(w, QCheckBox):
w.stateChanged.connect(self.parametersHaveChanged)
elif isinstance(w, MultipleInputPanel):
w.selectionChanged.connect(self.parametersHaveChanged)

def parametersHaveChanged(self):
try:
@@ -17,6 +17,7 @@
***************************************************************************
"""


__author__ = 'Victor Olaya'
__date__ = 'August 2012'
__copyright__ = '(C) 2012, Victor Olaya'
@@ -28,6 +29,7 @@
import os

from PyQt4 import uic
from PyQt4.QtCore import pyqtSignal

from processing.gui.MultipleInputDialog import MultipleInputDialog
from processing.gui.MultipleFileInputDialog import MultipleFileInputDialog
@@ -39,6 +41,8 @@

class MultipleInputPanel(BASE, WIDGET):

selectionChanged = pyqtSignal()

def __init__(self, options=None, datatype=None):
super(MultipleInputPanel, self).__init__(None)
self.setupUi(self)
@@ -68,3 +72,5 @@ def showSelectionDialog(self):
self.selectedoptions = dlg.selectedoptions
self.leText.setText(
self.tr('%d elements selected') % len(self.selectedoptions))
self.selectionChanged.emit()

0 comments on commit 943b101

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