UI/DiffDialog.py

branch
Py2 comp.
changeset 2525
8b507a9a2d40
parent 2302
f29e9405c851
child 2677
3d4277929fb3
equal deleted inserted replaced
2523:139f182b72f6 2525:8b507a9a2d40
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a dialog to compare two files. 7 Module implementing a dialog to compare two files.
8 """ 8 """
9
10 from __future__ import unicode_literals # __IGNORE_WARNING__
9 11
10 import os 12 import os
11 import time 13 import time
12 14
13 from PyQt4.QtCore import QFileInfo, QEvent, pyqtSlot 15 from PyQt4.QtCore import QFileInfo, QEvent, pyqtSlot
200 """ 202 """
201 def __init__(self, parent=None): 203 def __init__(self, parent=None):
202 """ 204 """
203 Constructor 205 Constructor
204 """ 206 """
205 super().__init__(parent) 207 super(DiffDialog, self).__init__(parent)
206 self.setupUi(self) 208 self.setupUi(self)
207 209
208 self.file1Completer = E5FileCompleter(self.file1Edit) 210 self.file1Completer = E5FileCompleter(self.file1Edit)
209 self.file2Completer = E5FileCompleter(self.file2Edit) 211 self.file2Completer = E5FileCompleter(self.file2Edit)
210 212
249 251
250 @param filename name of a file to use as the first file (string) 252 @param filename name of a file to use as the first file (string)
251 """ 253 """
252 if filename: 254 if filename:
253 self.file1Edit.setText(filename) 255 self.file1Edit.setText(filename)
254 super().show() 256 super(DiffDialog, self).show()
255 257
256 def on_buttonBox_clicked(self, button): 258 def on_buttonBox_clicked(self, button):
257 """ 259 """
258 Private slot called by a button of the button box clicked. 260 Private slot called by a button of the button box clicked.
259 261
498 """ 500 """
499 Constructor 501 Constructor
500 502
501 @param parent reference to the parent widget (QWidget) 503 @param parent reference to the parent widget (QWidget)
502 """ 504 """
503 super().__init__(parent) 505 super(DiffWindow, self).__init__(parent)
504 506
505 self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) 507 self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet"))
506 508
507 self.cw = DiffDialog(self) 509 self.cw = DiffDialog(self)
508 self.cw.installEventFilter(self) 510 self.cw.installEventFilter(self)

eric ide

mercurial