19 |
19 |
20 def __init__(self, shelveNames, shelveName="", parent=None): |
20 def __init__(self, shelveNames, shelveName="", parent=None): |
21 """ |
21 """ |
22 Constructor |
22 Constructor |
23 |
23 |
24 @param shelveNames list of available shelves (list of string) |
24 @param shelveNames list of available shelves |
25 @param shelveName name of the shelve to restore (string) |
25 @type list of str |
26 @param parent reference to the parent widget (QWidget) |
26 @param shelveName name of the shelve to restore |
|
27 @type str |
|
28 @param parent reference to the parent widget |
|
29 @type QWidget |
27 """ |
30 """ |
28 super().__init__(parent) |
31 super().__init__(parent) |
29 self.setupUi(self) |
32 self.setupUi(self) |
30 |
33 |
31 self.nameComboBox.addItem("") |
34 self.nameComboBox.addItem("") |
39 |
42 |
40 def getData(self): |
43 def getData(self): |
41 """ |
44 """ |
42 Public method to get the user data. |
45 Public method to get the user data. |
43 |
46 |
44 @return tuple containing the name (string) and a flag indicating |
47 @return tuple containing the name and a flag indicating to keep the |
45 to keep the shelved change (boolean) |
48 shelved change |
|
49 @rtype tuple of (str, bool) |
46 """ |
50 """ |
47 return ( |
51 return ( |
48 self.nameComboBox.currentText().replace(" ", "_"), |
52 self.nameComboBox.currentText().replace(" ", "_"), |
49 self.keepCheckBox.isChecked(), |
53 self.keepCheckBox.isChecked(), |
50 ) |
54 ) |