Project/AddDirectoryDialog.py

changeset 5599
033967644b1f
parent 5389
9b1c800daff3
child 5969
584c21b6587a
diff -r 3d88d53f8c2b -r 033967644b1f Project/AddDirectoryDialog.py
--- a/Project/AddDirectoryDialog.py	Thu Mar 09 19:28:59 2017 +0100
+++ b/Project/AddDirectoryDialog.py	Fri Mar 10 17:32:19 2017 +0100
@@ -21,13 +21,13 @@
     """
     Class implementing a dialog to add files of a directory to the project.
     """
-    def __init__(self, pro, filter='source', parent=None, name=None,
+    def __init__(self, pro, fileTypeFilter='source', parent=None, name=None,
                  startdir=None):
         """
         Constructor
         
         @param pro reference to the project object
-        @param filter file type filter (string)
+        @param fileTypeFilter file type filter (string)
         @param parent parent widget of this dialog (QWidget)
         @param name name of this dialog (string)
         @param startdir start directory for the selection dialog
@@ -46,19 +46,19 @@
         self.targetDirPicker.setText(self.ppath)
         self.on_filterComboBox_highlighted('(*.py)')
         # enable all dialog elements
-        if filter == 'source':  # it is a source file
+        if fileTypeFilter == 'source':  # it is a source file
             self.filterComboBox.addItem(
                 self.tr("Source Files"), "SOURCES")
-        elif filter == 'form':
+        elif fileTypeFilter == 'form':
             self.filterComboBox.addItem(
                 self.tr("Forms Files"), "FORMS")
-        elif filter == 'resource':
+        elif fileTypeFilter == 'resource':
             self.filterComboBox.addItem(
                 self.tr("Resource Files"), "RESOURCES")
-        elif filter == 'interface':
+        elif fileTypeFilter == 'interface':
             self.filterComboBox.addItem(
                 self.tr("Interface Files"), "INTERFACES")
-        elif filter == 'others':
+        elif fileTypeFilter == 'others':
             self.filterComboBox.addItem(
                 self.tr("Other Files (*)"), "OTHERS")
             self.on_filterComboBox_highlighted('(*)')
@@ -95,7 +95,7 @@
             self.recursiveCheckBox.setEnabled(True)
         
     @pyqtSlot(str)
-    def on_sourceDirPicker_textChanged(self, dir):
+    def on_sourceDirPicker_textChanged(self, directory):
         """
         Private slot to handle the source directory text changed.
         
@@ -104,10 +104,10 @@
         It is assumed, that the user wants to add a bunch of files to
         the project in place.
         
-        @param dir the text of the source directory line edit (string)
+        @param directory the text of the source directory line edit (string)
         """
-        if dir.startswith(self.ppath):
-            self.targetDirPicker.setText(dir)
+        if directory.startswith(self.ppath):
+            self.targetDirPicker.setText(directory)
         
     def getData(self):
         """

eric ide

mercurial