83 self.connect(self, SIGNAL('userListActivated(int, const QString)'), |
83 self.connect(self, SIGNAL('userListActivated(int, const QString)'), |
84 self.__completionListSelected) |
84 self.__completionListSelected) |
85 |
85 |
86 self.__showStdOutErr = Preferences.getShell("ShowStdOutErr") |
86 self.__showStdOutErr = Preferences.getShell("ShowStdOutErr") |
87 if self.__showStdOutErr: |
87 if self.__showStdOutErr: |
88 self.connect(dbs, SIGNAL('clientProcessStdout'), self.__writeStdOut) |
88 dbs.clientProcessStdout.connect(self.__writeStdOut) |
89 self.connect(dbs, SIGNAL('clientProcessStderr'), self.__writeStdErr) |
89 dbs.clientProcessStderr.connect(self.__writeStdErr) |
90 self.connect(dbs, SIGNAL('clientOutput'), self.__write) |
90 dbs.clientOutput.connect(self.__write) |
91 self.connect(dbs, SIGNAL('clientStatement'), self.__clientStatement) |
91 dbs.clientStatement.connect(self.__clientStatement) |
92 self.connect(dbs, SIGNAL('clientGone'), self.__initialise) |
92 dbs.clientGone.connect(self.__initialise) |
93 self.connect(dbs, SIGNAL('clientRawInput'), self.__raw_input) |
93 dbs.clientRawInput.connect(self.__raw_input) |
94 self.connect(dbs, SIGNAL('clientBanner'), self.__writeBanner) |
94 dbs.clientBanner.connect(self.__writeBanner) |
95 self.connect(dbs, SIGNAL('clientCompletionList'), self.__showCompletions) |
95 dbs.clientCompletionList.connect(self.__showCompletions) |
96 self.connect(dbs, SIGNAL('clientCapabilities'), self.__clientCapabilities) |
96 dbs.clientCapabilities.connect(self.__clientCapabilities) |
97 self.connect(dbs, SIGNAL('clientException'), self.__clientError) |
97 dbs.clientException.connect(self.__clientError) |
98 self.connect(dbs, SIGNAL('clientSyntaxError'), self.__clientError) |
98 dbs.clientSyntaxError.connect(self.__clientError) |
99 self.dbs = dbs |
99 self.dbs = dbs |
100 |
100 |
101 # Initialise instance variables. |
101 # Initialise instance variables. |
102 self.__initialise() |
102 self.__initialise() |
103 self.prline = 0 |
103 self.prline = 0 |
1262 |
1262 |
1263 # do stdout /stderr stuff |
1263 # do stdout /stderr stuff |
1264 showStdOutErr = Preferences.getShell("ShowStdOutErr") |
1264 showStdOutErr = Preferences.getShell("ShowStdOutErr") |
1265 if self.__showStdOutErr != showStdOutErr: |
1265 if self.__showStdOutErr != showStdOutErr: |
1266 if showStdOutErr: |
1266 if showStdOutErr: |
1267 self.connect(self.dbs, SIGNAL('clientProcessStdout'), |
1267 self.dbs.clientProcessStdout.connect(self.__writeStdOut) |
1268 self.__writeStdOut) |
1268 self.dbs.clientProcessStderr.connect(self.__writeStdErr) |
1269 self.connect(self.dbs, SIGNAL('clientProcessStderr'), |
|
1270 self.__writeStdErr) |
|
1271 else: |
1269 else: |
1272 self.disconnect(self.dbs, SIGNAL('clientProcessStdout'), |
1270 self.dbs.clientProcessStdout.disconnect(self.__writeStdOut) |
1273 self.__writeStdOut) |
1271 self.dbs.clientProcessStderr.disconnect(self.__writeStdErr) |
1274 self.disconnect(self.dbs, SIGNAL('clientProcessStderr'), |
|
1275 self.__writeStdErr) |
|
1276 self.__showStdOutErr = showStdOutErr |
1272 self.__showStdOutErr = showStdOutErr |
1277 |
1273 |
1278 def __showCompletions(self, completions, text): |
1274 def __showCompletions(self, completions, text): |
1279 """ |
1275 """ |
1280 Private method to display the possible completions. |
1276 Private method to display the possible completions. |