|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2022 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing the Corba configuration page. |
|
8 """ |
|
9 |
|
10 from eric7.EricWidgets.EricPathPicker import EricPathPickerModes |
|
11 from eric7.Preferences.ConfigurationPages.ConfigurationPageBase import ( |
|
12 ConfigurationPageBase, |
|
13 ) |
|
14 |
|
15 from .Ui_CorbaPage import Ui_CorbaPage |
|
16 |
|
17 |
|
18 class CorbaPage(ConfigurationPageBase, Ui_CorbaPage): |
|
19 """ |
|
20 Class implementing the Corba configuration page. |
|
21 """ |
|
22 |
|
23 def __init__(self, plugin): |
|
24 """ |
|
25 Constructor |
|
26 |
|
27 @param plugin reference to the plugin object |
|
28 @type CorbaExtensionPlugin |
|
29 """ |
|
30 super().__init__() |
|
31 self.setupUi(self) |
|
32 self.setObjectName("CorbaPage") |
|
33 |
|
34 self.__plugin = plugin |
|
35 |
|
36 self.idlPicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) |
|
37 self.idlPicker.setToolTip( |
|
38 self.tr("Press to select the IDL compiler via a file selection dialog.") |
|
39 ) |
|
40 |
|
41 # set initial values |
|
42 self.idlPicker.setText(self.__plugin.getPreferences("omniidl")) |
|
43 |
|
44 def save(self): |
|
45 """ |
|
46 Public slot to save the Corba configuration. |
|
47 """ |
|
48 self.__plugin.setPreferences("omniidl", self.idlPicker.text()) |