15 |
15 |
16 class ViewProfileDialog(QDialog): |
16 class ViewProfileDialog(QDialog): |
17 """ |
17 """ |
18 Class implementing a dialog to configure the various view profiles. |
18 Class implementing a dialog to configure the various view profiles. |
19 """ |
19 """ |
20 def __init__(self, layout, editVisibilities, debugVisibilities, parent=None): |
20 def __init__(self, layout, editVisibilities, debugVisibilities, |
|
21 parent=None): |
21 """ |
22 """ |
22 Constructor |
23 Constructor |
23 |
24 |
24 @param layout type of the window layout (string) |
25 @param layout type of the window layout (string) |
25 @param editVisibilities list of flags giving the visibilities |
26 @param editVisibilities list of flags giving the visibilities |
35 if self.__layout == "Toolboxes": |
36 if self.__layout == "Toolboxes": |
36 self.ui = Ui_ViewProfileToolboxesDialog() |
37 self.ui = Ui_ViewProfileToolboxesDialog() |
37 elif self.__layout == "Sidebars": |
38 elif self.__layout == "Sidebars": |
38 self.ui = Ui_ViewProfileSidebarsDialog() |
39 self.ui = Ui_ViewProfileSidebarsDialog() |
39 else: |
40 else: |
40 raise ValueError("Illegal layout given ({0}).".format(self.__layout)) |
41 raise ValueError( |
|
42 "Illegal layout given ({0}).".format(self.__layout)) |
41 self.ui.setupUi(self) |
43 self.ui.setupUi(self) |
42 |
44 |
43 if self.__layout in ["Toolboxes", "Sidebars"]: |
45 if self.__layout in ["Toolboxes", "Sidebars"]: |
44 # set the edit profile |
46 # set the edit profile |
45 self.ui.epltCheckBox.setChecked(editVisibilities[0]) |
47 self.ui.epltCheckBox.setChecked(editVisibilities[0]) |