129 self.cDeletedFormat.setBackground(QBrush(QColor(237, 190, 190))) |
129 self.cDeletedFormat.setBackground(QBrush(QColor(237, 190, 190))) |
130 self.cReplacedFormat = self.contents_1.currentCharFormat() |
130 self.cReplacedFormat = self.contents_1.currentCharFormat() |
131 self.cReplacedFormat.setBackground(QBrush(QColor(190, 190, 237))) |
131 self.cReplacedFormat.setBackground(QBrush(QColor(190, 190, 237))) |
132 |
132 |
133 # connect some of our widgets explicitly |
133 # connect some of our widgets explicitly |
134 self.connect(self.file1Edit, SIGNAL("textChanged(const QString &)"), |
134 self.file1Edit.textChanged.connect(self.__fileChanged) |
135 self.__fileChanged) |
135 self.file2Edit.textChanged.connect(self.__fileChanged) |
136 self.connect(self.file2Edit, SIGNAL("textChanged(const QString &)"), |
136 self.synchronizeCheckBox.toggled[bool].connect( |
137 self.__fileChanged) |
137 self.on_synchronizeCheckBox_toggled) |
138 self.connect(self.synchronizeCheckBox, SIGNAL("toggled(bool)"), |
138 self.vsb1.valueChanged.connect(self.__scrollBarMoved) |
139 self.on_synchronizeCheckBox_toggled) |
139 self.vsb1.valueChanged.connect(self.vsb2.setValue) |
140 self.connect(self.vsb1, SIGNAL("valueChanged(int)"), self.__scrollBarMoved) |
140 self.vsb2.valueChanged.connect(self.vsb1.setValue) |
141 self.connect(self.vsb1, SIGNAL('valueChanged(int)'), |
|
142 self.vsb2, SLOT('setValue(int)')) |
|
143 self.connect(self.vsb2, SIGNAL('valueChanged(int)'), |
|
144 self.vsb1, SLOT('setValue(int)')) |
|
145 |
141 |
146 self.diffParas = [] |
142 self.diffParas = [] |
147 self.currentDiffPos = -1 |
143 self.currentDiffPos = -1 |
148 |
144 |
149 self.markerPattern = "\0\+|\0\^|\0\-" |
145 self.markerPattern = "\0\+|\0\^|\0\-" |
414 |
410 |
415 @param sync flag indicating synchronisation status (boolean) |
411 @param sync flag indicating synchronisation status (boolean) |
416 """ |
412 """ |
417 if sync: |
413 if sync: |
418 self.hsb2.setValue(self.hsb1.value()) |
414 self.hsb2.setValue(self.hsb1.value()) |
419 self.connect(self.hsb1, SIGNAL('valueChanged(int)'), |
415 self.hsb1.valueChanged.connect(self.hsb2.setValue) |
420 self.hsb2, SLOT('setValue(int)')) |
416 self.hsb2.valueChanged.connect(self.hsb1.setValue) |
421 self.connect(self.hsb2, SIGNAL('valueChanged(int)'), |
|
422 self.hsb1, SLOT('setValue(int)')) |
|
423 else: |
417 else: |
424 self.disconnect(self.hsb1, SIGNAL('valueChanged(int)'), |
418 self.hsb1.valueChanged.disconnect(self.hsb2.setValue) |
425 self.hsb2, SLOT('setValue(int)')) |
419 self.hsb2.valueChanged.disconnect(self.hsb1.setValue) |
426 self.disconnect(self.hsb2, SIGNAL('valueChanged(int)'), |
|
427 self.hsb1, SLOT('setValue(int)')) |
|
428 |
420 |
429 class CompareWindow(QMainWindow): |
421 class CompareWindow(QMainWindow): |
430 """ |
422 """ |
431 Main window class for the standalone dialog. |
423 Main window class for the standalone dialog. |
432 """ |
424 """ |