Navigation Menu

Skip to content

Commit

Permalink
[processing] added selectionChanged signal to MultipleInputPanel
Browse files Browse the repository at this point in the history
linked signal with GdalAlgorithmDialog
  • Loading branch information
volaya committed Jan 6, 2016
1 parent 1f22b43 commit 943b101
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/plugins/processing/algs/gdal/GdalAlgorithmDialog.py
@@ -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):
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions python/plugins/processing/gui/MultipleInputPanel.py
Expand Up @@ -17,6 +17,7 @@
***************************************************************************
"""


__author__ = 'Victor Olaya'
__date__ = 'August 2012'
__copyright__ = '(C) 2012, Victor Olaya'
Expand All @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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.