24 class HgCopyDialog(QDialog, Ui_HgCopyDialog): |
24 class HgCopyDialog(QDialog, Ui_HgCopyDialog): |
25 """ |
25 """ |
26 Class implementing a dialog to enter the data for a copy or rename |
26 Class implementing a dialog to enter the data for a copy or rename |
27 operation. |
27 operation. |
28 """ |
28 """ |
29 def __init__(self, source, parent=None, move=False, force=False): |
29 def __init__(self, source, parent=None, move=False): |
30 """ |
30 """ |
31 Constructor |
31 Constructor |
32 |
32 |
33 @param source name of the source file/directory (string) |
33 @param source name of the source file/directory (string) |
34 @param parent parent widget (QWidget) |
34 @param parent parent widget (QWidget) |
35 @param move flag indicating a move operation (boolean) |
35 @param move flag indicating a move operation (boolean) |
36 @param force flag indicating a forced operation (boolean) |
|
37 """ |
36 """ |
38 super().__init__(parent) |
37 super().__init__(parent) |
39 self.setupUi(self) |
38 self.setupUi(self) |
40 |
39 |
41 self.dirButton.setIcon(UI.PixmapCache.getIcon("open.png")) |
40 self.dirButton.setIcon(UI.PixmapCache.getIcon("open.png")) |
48 |
47 |
49 if move: |
48 if move: |
50 self.setWindowTitle(self.tr('Mercurial Move')) |
49 self.setWindowTitle(self.tr('Mercurial Move')) |
51 else: |
50 else: |
52 self.forceCheckBox.setEnabled(False) |
51 self.forceCheckBox.setEnabled(False) |
53 self.forceCheckBox.setChecked(force) |
|
54 |
52 |
55 self.sourceEdit.setText(source) |
53 self.sourceEdit.setText(source) |
56 |
54 |
57 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) |
55 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) |
58 |
56 |