7 Module implementing a dialog to show the output of the hg diff command process. |
7 Module implementing a dialog to show the output of the hg diff command process. |
8 """ |
8 """ |
9 |
9 |
10 import os |
10 import os |
11 |
11 |
12 from PyQt4.QtCore import pyqtSlot, QProcess, SIGNAL, QTimer, QFileInfo |
12 from PyQt4.QtCore import pyqtSlot, QProcess, QTimer, QFileInfo |
13 from PyQt4.QtGui import QWidget, QDialogButtonBox, QBrush, QColor, QMessageBox, \ |
13 from PyQt4.QtGui import QWidget, QDialogButtonBox, QBrush, QColor, QMessageBox, \ |
14 QTextCursor, QFileDialog, QLineEdit |
14 QTextCursor, QFileDialog, QLineEdit |
15 |
15 |
16 from .Ui_HgDiffDialog import Ui_HgDiffDialog |
16 from .Ui_HgDiffDialog import Ui_HgDiffDialog |
17 |
17 |
49 self.cRemovedFormat = self.contents.currentCharFormat() |
49 self.cRemovedFormat = self.contents.currentCharFormat() |
50 self.cRemovedFormat.setBackground(QBrush(QColor(237, 190, 190))) |
50 self.cRemovedFormat.setBackground(QBrush(QColor(237, 190, 190))) |
51 self.cLineNoFormat = self.contents.currentCharFormat() |
51 self.cLineNoFormat = self.contents.currentCharFormat() |
52 self.cLineNoFormat.setBackground(QBrush(QColor(255, 220, 168))) |
52 self.cLineNoFormat.setBackground(QBrush(QColor(255, 220, 168))) |
53 |
53 |
54 self.connect(self.process, SIGNAL('finished(int, QProcess::ExitStatus)'), |
54 self.process.finished.connect(self.__procFinished) |
55 self.__procFinished) |
55 self.process.readyReadStandardOutput.connect(self.__readStdout) |
56 self.connect(self.process, SIGNAL('readyReadStandardOutput()'), |
56 self.process.readyReadStandardOutput.connect(self.__readStderr) |
57 self.__readStdout) |
|
58 self.connect(self.process, SIGNAL('readyReadStandardError()'), |
|
59 self.__readStderr) |
|
60 |
57 |
61 def closeEvent(self, e): |
58 def closeEvent(self, e): |
62 """ |
59 """ |
63 Private slot implementing a close event handler. |
60 Private slot implementing a close event handler. |
64 |
61 |