24 def __init__(self, vcs, parent=None): |
24 def __init__(self, vcs, parent=None): |
25 """ |
25 """ |
26 Constructor |
26 Constructor |
27 |
27 |
28 @param vcs reference to the Mercurial object (Hg) |
28 @param vcs reference to the Mercurial object (Hg) |
29 @param parent reference to the parent widget (QWidget) |
29 @type Hg |
|
30 @param parent reference to the parent widget |
|
31 @type QWidget |
30 """ |
32 """ |
31 super().__init__(parent) |
33 super().__init__(parent) |
32 self.setupUi(self) |
34 self.setupUi(self) |
33 |
35 |
34 self.archivePicker.setMode(EricPathPickerModes.SAVE_FILE_ENSURE_EXTENSION_MODE) |
36 self.archivePicker.setMode(EricPathPickerModes.SAVE_FILE_ENSURE_EXTENSION_MODE) |
81 @pyqtSlot(str) |
83 @pyqtSlot(str) |
82 def on_archivePicker_textChanged(self, archive): |
84 def on_archivePicker_textChanged(self, archive): |
83 """ |
85 """ |
84 Private slot to handle changes of the archive name. |
86 Private slot to handle changes of the archive name. |
85 |
87 |
86 @param archive name of the archive (string) |
88 @param archive name of the archive |
|
89 @type str |
87 """ |
90 """ |
88 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( |
91 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( |
89 archive != "" |
92 archive != "" |
90 ) |
93 ) |
91 |
94 |
92 @pyqtSlot(int) |
95 @pyqtSlot(int) |
93 def on_typeComboBox_activated(self, index): |
96 def on_typeComboBox_activated(self, index): |
94 """ |
97 """ |
95 Private slot to react on changes of the selected archive type. |
98 Private slot to react on changes of the selected archive type. |
96 |
99 |
97 @param index index of the selected type (integer) |
100 @param index index of the selected type |
|
101 @type int |
98 """ |
102 """ |
99 type_ = self.typeComboBox.itemData(index) |
103 type_ = self.typeComboBox.itemData(index) |
100 if type_ == "files": |
104 if type_ == "files": |
101 self.archivePicker.setMode(EricPathPickerModes.DIRECTORY_MODE) |
105 self.archivePicker.setMode(EricPathPickerModes.DIRECTORY_MODE) |
102 else: |
106 else: |
110 |
114 |
111 def getData(self): |
115 def getData(self): |
112 """ |
116 """ |
113 Public method to retrieve the data. |
117 Public method to retrieve the data. |
114 |
118 |
115 @return tuple giving the archive name (string), the archive type |
119 @return tuple giving the archive name, the archive type, the directory prefix |
116 (string), the directory prefix 8string) and a flag indicating |
120 and a flag indicating to recurse into subrepositories |
117 to recurse into subrepositories (boolean) |
121 @rtype tuple of (str, str, str, bool) |
118 """ |
122 """ |
119 return ( |
123 return ( |
120 self.archivePicker.text(), |
124 self.archivePicker.text(), |
121 self.typeComboBox.itemData(self.typeComboBox.currentIndex()), |
125 self.typeComboBox.itemData(self.typeComboBox.currentIndex()), |
122 self.prefixEdit.text(), |
126 self.prefixEdit.text(), |