SqlBrowser/SqlConnectionDialog.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2791
a9577f248f04
parent 2965
d133c7edd88a
child 3145
a9de05d4a22f
equal deleted inserted replaced
3056:9986ec0e559a 3057:10516539f238
26 Class implementing a dialog to enter the connection parameters. 26 Class implementing a dialog to enter the connection parameters.
27 """ 27 """
28 def __init__(self, parent=None): 28 def __init__(self, parent=None):
29 """ 29 """
30 Constructor 30 Constructor
31
32 @param parent reference to the parent widget (QWidget)
31 """ 33 """
32 super(SqlConnectionDialog, self).__init__(parent) 34 super(SqlConnectionDialog, self).__init__(parent)
33 self.setupUi(self) 35 self.setupUi(self)
34 36
35 self.databaseFileCompleter = E5FileCompleter() 37 self.databaseFileCompleter = E5FileCompleter()
73 75
74 @pyqtSlot(str) 76 @pyqtSlot(str)
75 def on_driverCombo_activated(self, txt): 77 def on_driverCombo_activated(self, txt):
76 """ 78 """
77 Private slot handling the selection of a database driver. 79 Private slot handling the selection of a database driver.
80
81 @param txt text of the driver combo (string)
78 """ 82 """
79 self.__updateDialog() 83 self.__updateDialog()
80 84
81 @pyqtSlot(str) 85 @pyqtSlot(str)
82 def on_databaseEdit_textChanged(self, p0): 86 def on_databaseEdit_textChanged(self, txt):
83 """ 87 """
84 Private slot handling the change of the database name. 88 Private slot handling the change of the database name.
89
90 @param txt text of the edit (string)
85 """ 91 """
86 self.__updateDialog() 92 self.__updateDialog()
87 93
88 @pyqtSlot() 94 @pyqtSlot()
89 def on_databaseFileButton_clicked(self): 95 def on_databaseFileButton_clicked(self):
102 108
103 def getData(self): 109 def getData(self):
104 """ 110 """
105 Public method to retrieve the connection data. 111 Public method to retrieve the connection data.
106 112
107 @return tuple giving the driver name (string), the database name (string), 113 @return tuple giving the driver name (string), the database name
108 the user name (string), the password (string), the host name (string) 114 (string), the user name (string), the password (string), the
109 and the port (integer) 115 host name (string) and the port (integer)
110 """ 116 """
111 return ( 117 return (
112 self.driverCombo.currentText(), 118 self.driverCombo.currentText(),
113 self.databaseEdit.text(), 119 self.databaseEdit.text(),
114 self.usernameEdit.text(), 120 self.usernameEdit.text(),

eric ide

mercurial