ExtensionCorba/ConfigurationPage/CorbaPage.py

Wed, 30 Nov 2022 17:56:36 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 30 Nov 2022 17:56:36 +0100
changeset 1
d4384e4d7aff
child 32
cab6795a8df6
permissions
-rw-r--r--

First incarnation of the CORBA IDL support plugin, that was an integral part of eric7 previously.

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

eric ide

mercurial