11 from .Ui_EditorMouseClickHandlerPage import Ui_EditorMouseClickHandlerPage |
11 from .Ui_EditorMouseClickHandlerPage import Ui_EditorMouseClickHandlerPage |
12 |
12 |
13 import Preferences |
13 import Preferences |
14 |
14 |
15 |
15 |
16 class EditorMouseClickHandlerPage(ConfigurationPageBase, |
16 class EditorMouseClickHandlerPage( |
17 Ui_EditorMouseClickHandlerPage): |
17 ConfigurationPageBase, Ui_EditorMouseClickHandlerPage |
|
18 ): |
18 """ |
19 """ |
19 Class implementing the Editor Mouse Click Handlers configuration page. |
20 Class implementing the Editor Mouse Click Handlers configuration page. |
20 """ |
21 """ |
|
22 |
21 def __init__(self): |
23 def __init__(self): |
22 """ |
24 """ |
23 Constructor |
25 Constructor |
24 """ |
26 """ |
25 super().__init__() |
27 super().__init__() |
26 self.setupUi(self) |
28 self.setupUi(self) |
27 self.setObjectName("EditorMouseClickHandlerPage") |
29 self.setObjectName("EditorMouseClickHandlerPage") |
28 |
30 |
29 # set initial values |
31 # set initial values |
30 self.mcEnabledCheckBox.setChecked( |
32 self.mcEnabledCheckBox.setChecked( |
31 Preferences.getEditor("MouseClickHandlersEnabled")) |
33 Preferences.getEditor("MouseClickHandlersEnabled") |
32 |
34 ) |
|
35 |
33 def save(self): |
36 def save(self): |
34 """ |
37 """ |
35 Public slot to save the Editor Mouse Click Handlers configuration. |
38 Public slot to save the Editor Mouse Click Handlers configuration. |
36 """ |
39 """ |
37 Preferences.setEditor( |
40 Preferences.setEditor( |
38 "MouseClickHandlersEnabled", |
41 "MouseClickHandlersEnabled", self.mcEnabledCheckBox.isChecked() |
39 self.mcEnabledCheckBox.isChecked()) |
42 ) |
40 |
43 |
41 |
44 |
42 def create(dlg): |
45 def create(dlg): |
43 """ |
46 """ |
44 Module function to create the configuration page. |
47 Module function to create the configuration page. |
45 |
48 |
46 @param dlg reference to the configuration dialog |
49 @param dlg reference to the configuration dialog |
47 @return reference to the instantiated page (ConfigurationPageBase) |
50 @return reference to the instantiated page (ConfigurationPageBase) |
48 """ |
51 """ |
49 page = EditorMouseClickHandlerPage() |
52 page = EditorMouseClickHandlerPage() |
50 return page |
53 return page |