7 Module implementing the Subversion configuration page. |
7 Module implementing the Subversion configuration page. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt6.QtCore import pyqtSlot |
10 from PyQt6.QtCore import pyqtSlot |
11 |
11 |
12 from Preferences.ConfigurationPages.ConfigurationPageBase import ( |
12 from Preferences.ConfigurationPages.ConfigurationPageBase import ConfigurationPageBase |
13 ConfigurationPageBase |
|
14 ) |
|
15 from .Ui_SubversionPage import Ui_SubversionPage |
13 from .Ui_SubversionPage import Ui_SubversionPage |
16 |
14 |
17 |
15 |
18 class SubversionPage(ConfigurationPageBase, Ui_SubversionPage): |
16 class SubversionPage(ConfigurationPageBase, Ui_SubversionPage): |
19 """ |
17 """ |
20 Class implementing the Subversion configuration page. |
18 Class implementing the Subversion configuration page. |
21 """ |
19 """ |
|
20 |
22 def __init__(self, plugin): |
21 def __init__(self, plugin): |
23 """ |
22 """ |
24 Constructor |
23 Constructor |
25 |
24 |
26 @param plugin reference to the plugin object |
25 @param plugin reference to the plugin object |
27 """ |
26 """ |
28 super().__init__() |
27 super().__init__() |
29 self.setupUi(self) |
28 self.setupUi(self) |
30 self.setObjectName("SubversionPage") |
29 self.setObjectName("SubversionPage") |
31 |
30 |
32 self.__plugin = plugin |
31 self.__plugin = plugin |
33 |
32 |
34 # set initial values |
33 # set initial values |
35 self.logSpinBox.setValue(self.__plugin.getPreferences("LogLimit")) |
34 self.logSpinBox.setValue(self.__plugin.getPreferences("LogLimit")) |
36 |
35 |
37 def save(self): |
36 def save(self): |
38 """ |
37 """ |
39 Public slot to save the Subversion configuration. |
38 Public slot to save the Subversion configuration. |
40 """ |
39 """ |
41 self.__plugin.setPreferences("LogLimit", self.logSpinBox.value()) |
40 self.__plugin.setPreferences("LogLimit", self.logSpinBox.value()) |
42 |
41 |
43 @pyqtSlot() |
42 @pyqtSlot() |
44 def on_configButton_clicked(self): |
43 def on_configButton_clicked(self): |
45 """ |
44 """ |
46 Private slot to edit the Subversion config file. |
45 Private slot to edit the Subversion config file. |
47 """ |
46 """ |
48 from QScintilla.MiniEditor import MiniEditor |
47 from QScintilla.MiniEditor import MiniEditor |
|
48 |
49 cfgFile = self.__plugin.getConfigPath() |
49 cfgFile = self.__plugin.getConfigPath() |
50 editor = MiniEditor(cfgFile, "Properties", self) |
50 editor = MiniEditor(cfgFile, "Properties", self) |
51 editor.show() |
51 editor.show() |
52 |
52 |
53 @pyqtSlot() |
53 @pyqtSlot() |
54 def on_serversButton_clicked(self): |
54 def on_serversButton_clicked(self): |
55 """ |
55 """ |
56 Private slot to edit the Subversion servers file. |
56 Private slot to edit the Subversion servers file. |
57 """ |
57 """ |
58 from QScintilla.MiniEditor import MiniEditor |
58 from QScintilla.MiniEditor import MiniEditor |
|
59 |
59 serversFile = self.__plugin.getServersPath() |
60 serversFile = self.__plugin.getServersPath() |
60 editor = MiniEditor(serversFile, "Properties", self) |
61 editor = MiniEditor(serversFile, "Properties", self) |
61 editor.show() |
62 editor.show() |