24 Class implementing a dialog to enter the connection parameters. |
24 Class implementing a dialog to enter the connection parameters. |
25 """ |
25 """ |
26 def __init__(self, parent=None): |
26 def __init__(self, parent=None): |
27 """ |
27 """ |
28 Constructor |
28 Constructor |
|
29 |
|
30 @param parent reference to the parent widget (QWidget) |
29 """ |
31 """ |
30 super().__init__(parent) |
32 super().__init__(parent) |
31 self.setupUi(self) |
33 self.setupUi(self) |
32 |
34 |
33 self.databaseFileCompleter = E5FileCompleter() |
35 self.databaseFileCompleter = E5FileCompleter() |
71 |
73 |
72 @pyqtSlot(str) |
74 @pyqtSlot(str) |
73 def on_driverCombo_activated(self, txt): |
75 def on_driverCombo_activated(self, txt): |
74 """ |
76 """ |
75 Private slot handling the selection of a database driver. |
77 Private slot handling the selection of a database driver. |
|
78 |
|
79 @param txt text of the driver combo (string) |
76 """ |
80 """ |
77 self.__updateDialog() |
81 self.__updateDialog() |
78 |
82 |
79 @pyqtSlot(str) |
83 @pyqtSlot(str) |
80 def on_databaseEdit_textChanged(self, p0): |
84 def on_databaseEdit_textChanged(self, txt): |
81 """ |
85 """ |
82 Private slot handling the change of the database name. |
86 Private slot handling the change of the database name. |
|
87 |
|
88 @param txt text of the edit (string) |
83 """ |
89 """ |
84 self.__updateDialog() |
90 self.__updateDialog() |
85 |
91 |
86 @pyqtSlot() |
92 @pyqtSlot() |
87 def on_databaseFileButton_clicked(self): |
93 def on_databaseFileButton_clicked(self): |
100 |
106 |
101 def getData(self): |
107 def getData(self): |
102 """ |
108 """ |
103 Public method to retrieve the connection data. |
109 Public method to retrieve the connection data. |
104 |
110 |
105 @return tuple giving the driver name (string), the database name (string), |
111 @return tuple giving the driver name (string), the database name |
106 the user name (string), the password (string), the host name (string) |
112 (string), the user name (string), the password (string), the |
107 and the port (integer) |
113 host name (string) and the port (integer) |
108 """ |
114 """ |
109 return ( |
115 return ( |
110 self.driverCombo.currentText(), |
116 self.driverCombo.currentText(), |
111 self.databaseEdit.text(), |
117 self.databaseEdit.text(), |
112 self.usernameEdit.text(), |
118 self.usernameEdit.text(), |