88 class CompareDialog(QWidget, Ui_CompareDialog): |
88 class CompareDialog(QWidget, Ui_CompareDialog): |
89 """ |
89 """ |
90 Class implementing a dialog to compare two files and show the result side |
90 Class implementing a dialog to compare two files and show the result side |
91 by side. |
91 by side. |
92 """ |
92 """ |
93 def __init__(self, files=[], parent=None): |
93 def __init__(self, files=None, parent=None): |
94 """ |
94 """ |
95 Constructor |
95 Constructor |
96 |
96 |
97 @param files list of files to compare and their label |
97 @param files list of files to compare and their label |
98 (list of two tuples of two strings) |
98 (list of two tuples of two strings) |
99 @param parent parent widget (QWidget) |
99 @param parent parent widget (QWidget) |
100 """ |
100 """ |
101 super(CompareDialog, self).__init__(parent) |
101 super(CompareDialog, self).__init__(parent) |
102 self.setupUi(self) |
102 self.setupUi(self) |
|
103 |
|
104 if files is None: |
|
105 files = [] |
103 |
106 |
104 self.file1Picker.setMode(E5PathPickerModes.OpenFileMode) |
107 self.file1Picker.setMode(E5PathPickerModes.OpenFileMode) |
105 self.file2Picker.setMode(E5PathPickerModes.OpenFileMode) |
108 self.file2Picker.setMode(E5PathPickerModes.OpenFileMode) |
106 |
109 |
107 self.diffButton = self.buttonBox.addButton( |
110 self.diffButton = self.buttonBox.addButton( |
449 |
452 |
450 class CompareWindow(E5MainWindow): |
453 class CompareWindow(E5MainWindow): |
451 """ |
454 """ |
452 Main window class for the standalone dialog. |
455 Main window class for the standalone dialog. |
453 """ |
456 """ |
454 def __init__(self, files=[], parent=None): |
457 def __init__(self, files=None, parent=None): |
455 """ |
458 """ |
456 Constructor |
459 Constructor |
457 |
460 |
458 @param files list of files to compare and their label |
461 @param files list of files to compare and their label |
459 (list of two tuples of two strings) |
462 (list of two tuples of two strings) |