Preferences/ConfigurationPages/PythonPage.py

changeset 6381
37f23590dbbc
parent 6048
82ad8ec9548c
child 6645
ad476851d7e0
equal deleted inserted replaced
6380:4a932a7ab987 6381:37f23590dbbc
6 """ 6 """
7 Module implementing the Python configuration page. 7 Module implementing the Python configuration page.
8 """ 8 """
9 9
10 from __future__ import unicode_literals 10 from __future__ import unicode_literals
11
12 from PyQt5.QtCore import pyqtSlot
11 13
12 from .ConfigurationPageBase import ConfigurationPageBase 14 from .ConfigurationPageBase import ConfigurationPageBase
13 from .Ui_PythonPage import Ui_PythonPage 15 from .Ui_PythonPage import Ui_PythonPage
14 16
15 import Preferences 17 import Preferences
43 self.py2ExtensionsEdit.setText( 45 self.py2ExtensionsEdit.setText(
44 Preferences.getDebugger("PythonExtensions")) 46 Preferences.getDebugger("PythonExtensions"))
45 self.py3ExtensionsEdit.setText( 47 self.py3ExtensionsEdit.setText(
46 Preferences.getDebugger("Python3Extensions")) 48 Preferences.getDebugger("Python3Extensions"))
47 49
50 self.py2EnvironmentEdit.setText(
51 Preferences.getDebugger("Python2VirtualEnv"))
52 self.py3EnvironmentEdit.setText(
53 Preferences.getDebugger("Python3VirtualEnv"))
54
48 def save(self): 55 def save(self):
49 """ 56 """
50 Public slot to save the Python configuration. 57 Public slot to save the Python configuration.
51 """ 58 """
52 enc = self.stringEncodingComboBox.currentText() 59 enc = self.stringEncodingComboBox.currentText()
64 self.py2ExtensionsEdit.text()) 71 self.py2ExtensionsEdit.text())
65 Preferences.setDebugger( 72 Preferences.setDebugger(
66 "Python3Extensions", 73 "Python3Extensions",
67 self.py3ExtensionsEdit.text()) 74 self.py3ExtensionsEdit.text())
68 75
76 @pyqtSlot()
77 def on_refreshButton_clicked(self):
78 """
79 Private slot handling a click of the refresh button.
80 """
81 self.py2EnvironmentEdit.setText(
82 Preferences.getDebugger("Python2VirtualEnv"))
83 self.py3EnvironmentEdit.setText(
84 Preferences.getDebugger("Python3VirtualEnv"))
85
69 86
70 def create(dlg): 87 def create(dlg):
71 """ 88 """
72 Module function to create the configuration page. 89 Module function to create the configuration page.
73 90

eric ide

mercurial