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