MultiProject/AddProjectDialog.py

branch
maintenance
changeset 6693
3629d88ae235
parent 6653
ac800d2700d2
--- a/MultiProject/AddProjectDialog.py	Thu Jan 10 14:23:49 2019 +0100
+++ b/MultiProject/AddProjectDialog.py	Sat Feb 02 11:12:54 2019 +0100
@@ -25,15 +25,21 @@
     """
     Class implementing the add project dialog.
     """
-    def __init__(self, parent=None, startdir=None, project=None,
-                 categories=None):
+    def __init__(self, parent=None, startdir="", project=None,
+                 categories=None, category=""):
         """
         Constructor
         
-        @param parent parent widget of this dialog (QWidget)
-        @param startdir start directory for the selection dialog (string)
+        @param parent parent widget of this dialog
+        @type QWidget
+        @param startdir start directory for the selection dialog
+        @type str
         @param project dictionary containing project data
-        @param categories list of already used categories (list of string)
+        @type dict
+        @param categories list of already used categories
+        @type list of str
+        @param category category to be preset
+        @type str
         """
         super(AddProjectDialog, self).__init__(parent)
         self.setupUi(self)
@@ -44,6 +50,7 @@
         if categories:
             self.categoryComboBox.addItem("")
             self.categoryComboBox.addItems(sorted(categories))
+        self.categoryComboBox.setEditText(category)
         
         self.startdir = startdir
         self.uid = ""

eric ide

mercurial