ProjectPyramid/PyramidDialog.py

changeset 56
c7adc68350dd
parent 34
d20f7218d53c
child 57
e654970c913e
equal deleted inserted replaced
53:a3ba38d3a25e 56:c7adc68350dd
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a dialog starting a process and showing its output. 7 Module implementing a dialog starting a process and showing its output.
8 """ 8 """
9
10 from __future__ import unicode_literals # __IGNORE_WARNING__
11 try:
12 str = unicode
13 except (NameError):
14 pass
9 15
10 import os 16 import os
11 17
12 from PyQt4.QtCore import QProcess, QTimer, pyqtSlot, Qt, QCoreApplication 18 from PyQt4.QtCore import QProcess, QTimer, pyqtSlot, Qt, QCoreApplication
13 from PyQt4.QtGui import QDialog, QDialogButtonBox, QLineEdit, QTextEdit 19 from PyQt4.QtGui import QDialog, QDialogButtonBox, QLineEdit, QTextEdit
41 (string) 47 (string)
42 @keyparam msgError optional string to show upon unsuccessful execution 48 @keyparam msgError optional string to show upon unsuccessful execution
43 (string) 49 (string)
44 @keyparam parent parent widget (QWidget) 50 @keyparam parent parent widget (QWidget)
45 """ 51 """
46 super().__init__(parent) 52 super(PyramidDialog, self).__init__(parent)
47 self.setupUi(self) 53 self.setupUi(self)
48 54
49 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) 55 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False)
50 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) 56 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True)
51 57
287 """ 293 """
288 if self.intercept: 294 if self.intercept:
289 self.intercept = False 295 self.intercept = False
290 evt.accept() 296 evt.accept()
291 return 297 return
292 super().keyPressEvent(evt) 298 super(PyramidDialog, self).keyPressEvent(evt)

eric ide

mercurial