|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2024 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing the eric-ide server related settings. |
|
8 """ |
|
9 |
|
10 from eric7 import Preferences |
|
11 |
|
12 from .ConfigurationPageBase import ConfigurationPageBase |
|
13 from .Ui_EricServerPage import Ui_EricServerPage |
|
14 |
|
15 |
|
16 class EricServerPage(ConfigurationPageBase, Ui_EricServerPage): |
|
17 """ |
|
18 Class implementing the eric-ide server related settings. |
|
19 """ |
|
20 |
|
21 def __init__(self): |
|
22 """ |
|
23 Constructor |
|
24 """ |
|
25 super().__init__() |
|
26 self.setupUi(self) |
|
27 self.setObjectName("EricServerPage") |
|
28 |
|
29 # set initial values |
|
30 self.timeoutSpinBox.setValue(Preferences.getEricServer("ConnectionTimeout")) |
|
31 |
|
32 def save(self): |
|
33 """ |
|
34 Public slot to save the Cooperation configuration. |
|
35 """ |
|
36 Preferences.setEricServer("ConnectionTimeout", self.timeoutSpinBox.value()) |
|
37 |
|
38 |
|
39 def create(dlg): # noqa: U100 |
|
40 """ |
|
41 Module function to create the configuration page. |
|
42 |
|
43 @param dlg reference to the configuration dialog |
|
44 @type ConfigurationDialog |
|
45 @return reference to the instantiated page |
|
46 @rtype ConfigurationPageBase |
|
47 """ |
|
48 page = EricServerPage() |
|
49 return page |