src/eric7/Preferences/ConfigurationPages/InterfacePage.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
equal deleted inserted replaced
9220:e9e7eca7efee 9221:bf71ee032bb4
29 29
30 class InterfacePage(ConfigurationPageBase, Ui_InterfacePage): 30 class InterfacePage(ConfigurationPageBase, Ui_InterfacePage):
31 """ 31 """
32 Class implementing the Interface configuration page. 32 Class implementing the Interface configuration page.
33 """ 33 """
34
34 def __init__(self): 35 def __init__(self):
35 """ 36 """
36 Constructor 37 Constructor
37 """ 38 """
38 super().__init__() 39 super().__init__()
39 self.setupUi(self) 40 self.setupUi(self)
40 self.setObjectName("InterfacePage") 41 self.setObjectName("InterfacePage")
41 42
42 self.styleSheetPicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) 43 self.styleSheetPicker.setMode(EricPathPickerModes.OPEN_FILE_MODE)
43 self.styleSheetPicker.setFilters(self.tr( 44 self.styleSheetPicker.setFilters(
44 "Qt Style Sheets (*.qss);;Cascading Style Sheets (*.css);;" 45 self.tr(
45 "All files (*)")) 46 "Qt Style Sheets (*.qss);;Cascading Style Sheets (*.css);;"
47 "All files (*)"
48 )
49 )
46 self.styleSheetPicker.setDefaultDirectory(getConfig("ericStylesDir")) 50 self.styleSheetPicker.setDefaultDirectory(getConfig("ericStylesDir"))
47 51
48 styleIconsPath = ericApp().getStyleIconsPath() 52 styleIconsPath = ericApp().getStyleIconsPath()
49 self.styleIconsPathPicker.setMode( 53 self.styleIconsPathPicker.setMode(EricPathPickerModes.DIRECTORY_SHOW_FILES_MODE)
50 EricPathPickerModes.DIRECTORY_SHOW_FILES_MODE)
51 self.styleIconsPathPicker.setDefaultDirectory(styleIconsPath) 54 self.styleIconsPathPicker.setDefaultDirectory(styleIconsPath)
52 55
53 for iconBarSize in EricIconBar.BarSizes: 56 for iconBarSize in EricIconBar.BarSizes:
54 self.iconSizeComboBox.addItem( 57 self.iconSizeComboBox.addItem(
55 EricIconBar.BarSizes[iconBarSize][2], iconBarSize) 58 EricIconBar.BarSizes[iconBarSize][2], iconBarSize
56 59 )
60
57 # set initial values 61 # set initial values
58 self.__populateStyleCombo() 62 self.__populateStyleCombo()
59 self.__populateLanguageCombo() 63 self.__populateLanguageCombo()
60 64
61 self.uiBrowsersListFoldersFirstCheckBox.setChecked( 65 self.uiBrowsersListFoldersFirstCheckBox.setChecked(
62 Preferences.getUI("BrowsersListFoldersFirst")) 66 Preferences.getUI("BrowsersListFoldersFirst")
67 )
63 self.uiBrowsersHideNonPublicCheckBox.setChecked( 68 self.uiBrowsersHideNonPublicCheckBox.setChecked(
64 Preferences.getUI("BrowsersHideNonPublic")) 69 Preferences.getUI("BrowsersHideNonPublic")
70 )
65 self.uiBrowsersSortByOccurrenceCheckBox.setChecked( 71 self.uiBrowsersSortByOccurrenceCheckBox.setChecked(
66 Preferences.getUI("BrowsersListContentsByOccurrence")) 72 Preferences.getUI("BrowsersListContentsByOccurrence")
73 )
67 self.browserShowCodingCheckBox.setChecked( 74 self.browserShowCodingCheckBox.setChecked(
68 Preferences.getUI("BrowserShowCoding")) 75 Preferences.getUI("BrowserShowCoding")
69 self.fileFiltersEdit.setText( 76 )
70 Preferences.getUI("BrowsersFileFilters")) 77 self.fileFiltersEdit.setText(Preferences.getUI("BrowsersFileFilters"))
71 78
72 self.uiCaptionShowsFilenameGroupBox.setChecked( 79 self.uiCaptionShowsFilenameGroupBox.setChecked(
73 Preferences.getUI("CaptionShowsFilename")) 80 Preferences.getUI("CaptionShowsFilename")
74 self.filenameLengthSpinBox.setValue( 81 )
75 Preferences.getUI("CaptionFilenameLength")) 82 self.filenameLengthSpinBox.setValue(Preferences.getUI("CaptionFilenameLength"))
76 self.styleSheetPicker.setText(Preferences.getUI("StyleSheet")) 83 self.styleSheetPicker.setText(Preferences.getUI("StyleSheet"))
77 self.styleIconsPathPicker.setText(Preferences.getUI("StyleIconsPath")) 84 self.styleIconsPathPicker.setText(Preferences.getUI("StyleIconsPath"))
78 85
79 layoutType = Preferences.getUI("LayoutType") 86 layoutType = Preferences.getUI("LayoutType")
80 if layoutType == "Sidebars": 87 if layoutType == "Sidebars":
81 index = 0 88 index = 0
82 elif layoutType == "Toolboxes": 89 elif layoutType == "Toolboxes":
83 index = 1 90 index = 1
84 else: 91 else:
85 index = 0 # default for bad values 92 index = 0 # default for bad values
86 self.layoutComboBox.setCurrentIndex(index) 93 self.layoutComboBox.setCurrentIndex(index)
87 94
88 # integrated tools activation 95 # integrated tools activation
89 # left side 96 # left side
90 self.findReplaceCheckBox.setChecked( 97 self.findReplaceCheckBox.setChecked(Preferences.getUI("ShowFindFileWidget"))
91 Preferences.getUI("ShowFindFileWidget"))
92 self.findLocationCheckBox.setChecked( 98 self.findLocationCheckBox.setChecked(
93 Preferences.getUI("ShowFindLocationWidget")) 99 Preferences.getUI("ShowFindLocationWidget")
94 self.templateViewerCheckBox.setChecked( 100 )
95 Preferences.getUI("ShowTemplateViewer")) 101 self.templateViewerCheckBox.setChecked(Preferences.getUI("ShowTemplateViewer"))
96 self.fileBrowserCheckBox.setChecked( 102 self.fileBrowserCheckBox.setChecked(Preferences.getUI("ShowFileBrowser"))
97 Preferences.getUI("ShowFileBrowser")) 103 self.symbolsCheckBox.setChecked(Preferences.getUI("ShowSymbolsViewer"))
98 self.symbolsCheckBox.setChecked(
99 Preferences.getUI("ShowSymbolsViewer"))
100 # right side 104 # right side
101 self.codeDocumentationViewerCheckBox.setChecked( 105 self.codeDocumentationViewerCheckBox.setChecked(
102 Preferences.getUI("ShowCodeDocumentationViewer")) 106 Preferences.getUI("ShowCodeDocumentationViewer")
103 self.helpViewerCheckBox.setChecked( 107 )
104 Preferences.getUI("ShowInternalHelpViewer")) 108 self.helpViewerCheckBox.setChecked(Preferences.getUI("ShowInternalHelpViewer"))
105 self.condaCheckBox.setChecked( 109 self.condaCheckBox.setChecked(Preferences.getUI("ShowCondaPackageManager"))
106 Preferences.getUI("ShowCondaPackageManager")) 110 self.pypiCheckBox.setChecked(Preferences.getUI("ShowPyPIPackageManager"))
107 self.pypiCheckBox.setChecked( 111 self.cooperationCheckBox.setChecked(Preferences.getUI("ShowCooperation"))
108 Preferences.getUI("ShowPyPIPackageManager")) 112 self.ircCheckBox.setChecked(Preferences.getUI("ShowIrc"))
109 self.cooperationCheckBox.setChecked( 113 self.microPythonCheckBox.setChecked(Preferences.getUI("ShowMicroPython"))
110 Preferences.getUI("ShowCooperation"))
111 self.ircCheckBox.setChecked(
112 Preferences.getUI("ShowIrc"))
113 self.microPythonCheckBox.setChecked(
114 Preferences.getUI("ShowMicroPython"))
115 # bottom side 114 # bottom side
116 self.numbersCheckBox.setChecked( 115 self.numbersCheckBox.setChecked(Preferences.getUI("ShowNumbersViewer"))
117 Preferences.getUI("ShowNumbersViewer")) 116
118
119 self.iconSizeComboBox.setCurrentIndex( 117 self.iconSizeComboBox.setCurrentIndex(
120 self.iconSizeComboBox.findData(Preferences.getUI("IconBarSize"))) 118 self.iconSizeComboBox.findData(Preferences.getUI("IconBarSize"))
119 )
121 self.__iconBarColor = Preferences.getUI("IconBarColor") 120 self.__iconBarColor = Preferences.getUI("IconBarColor")
122 self.__setIconBarSamples() 121 self.__setIconBarSamples()
123 122
124 self.combinedLeftRightSidebarCheckBox.setChecked( 123 self.combinedLeftRightSidebarCheckBox.setChecked(
125 Preferences.getUI("CombinedLeftRightSidebar")) 124 Preferences.getUI("CombinedLeftRightSidebar")
126 125 )
126
127 # connect the icon size combo box after initialization is complete 127 # connect the icon size combo box after initialization is complete
128 self.iconSizeComboBox.currentIndexChanged.connect( 128 self.iconSizeComboBox.currentIndexChanged.connect(self.__setIconBarSamples)
129 self.__setIconBarSamples) 129
130
131 def save(self): 130 def save(self):
132 """ 131 """
133 Public slot to save the Interface configuration. 132 Public slot to save the Interface configuration.
134 """ 133 """
135 # save the style settings 134 # save the style settings
136 styleIndex = self.styleComboBox.currentIndex() 135 styleIndex = self.styleComboBox.currentIndex()
137 style = self.styleComboBox.itemData(styleIndex) 136 style = self.styleComboBox.itemData(styleIndex)
138 Preferences.setUI("Style", style) 137 Preferences.setUI("Style", style)
139 138
140 # save the other UI related settings 139 # save the other UI related settings
141 Preferences.setUI( 140 Preferences.setUI(
142 "BrowsersListFoldersFirst", 141 "BrowsersListFoldersFirst",
143 self.uiBrowsersListFoldersFirstCheckBox.isChecked()) 142 self.uiBrowsersListFoldersFirstCheckBox.isChecked(),
144 Preferences.setUI( 143 )
145 "BrowsersHideNonPublic", 144 Preferences.setUI(
146 self.uiBrowsersHideNonPublicCheckBox.isChecked()) 145 "BrowsersHideNonPublic", self.uiBrowsersHideNonPublicCheckBox.isChecked()
146 )
147 Preferences.setUI( 147 Preferences.setUI(
148 "BrowsersListContentsByOccurrence", 148 "BrowsersListContentsByOccurrence",
149 self.uiBrowsersSortByOccurrenceCheckBox.isChecked()) 149 self.uiBrowsersSortByOccurrenceCheckBox.isChecked(),
150 Preferences.setUI( 150 )
151 "BrowserShowCoding", 151 Preferences.setUI(
152 self.browserShowCodingCheckBox.isChecked()) 152 "BrowserShowCoding", self.browserShowCodingCheckBox.isChecked()
153 Preferences.setUI( 153 )
154 "BrowsersFileFilters", 154 Preferences.setUI("BrowsersFileFilters", self.fileFiltersEdit.text())
155 self.fileFiltersEdit.text()) 155
156 156 Preferences.setUI(
157 Preferences.setUI( 157 "CaptionShowsFilename", self.uiCaptionShowsFilenameGroupBox.isChecked()
158 "CaptionShowsFilename", 158 )
159 self.uiCaptionShowsFilenameGroupBox.isChecked()) 159 Preferences.setUI("CaptionFilenameLength", self.filenameLengthSpinBox.value())
160 Preferences.setUI( 160 Preferences.setUI("StyleSheet", self.styleSheetPicker.text())
161 "CaptionFilenameLength", 161 Preferences.setUI("StyleIconsPath", self.styleIconsPathPicker.text())
162 self.filenameLengthSpinBox.value()) 162
163 Preferences.setUI(
164 "StyleSheet",
165 self.styleSheetPicker.text())
166 Preferences.setUI(
167 "StyleIconsPath",
168 self.styleIconsPathPicker.text())
169
170 # save the language settings 163 # save the language settings
171 uiLanguageIndex = self.languageComboBox.currentIndex() 164 uiLanguageIndex = self.languageComboBox.currentIndex()
172 uiLanguage = ( 165 uiLanguage = (
173 self.languageComboBox.itemData(uiLanguageIndex) 166 self.languageComboBox.itemData(uiLanguageIndex) if uiLanguageIndex else None
174 if uiLanguageIndex else
175 None
176 ) 167 )
177 Preferences.setUILanguage(uiLanguage) 168 Preferences.setUILanguage(uiLanguage)
178 169
179 # save the interface layout settings 170 # save the interface layout settings
180 if self.layoutComboBox.currentIndex() == 0: 171 if self.layoutComboBox.currentIndex() == 0:
181 layoutType = "Sidebars" 172 layoutType = "Sidebars"
182 elif self.layoutComboBox.currentIndex() == 1: 173 elif self.layoutComboBox.currentIndex() == 1:
183 layoutType = "Toolboxes" 174 layoutType = "Toolboxes"
184 else: 175 else:
185 layoutType = "Sidebars" # just in case 176 layoutType = "Sidebars" # just in case
186 Preferences.setUI("LayoutType", layoutType) 177 Preferences.setUI("LayoutType", layoutType)
187 178
188 # save the integrated tools activation 179 # save the integrated tools activation
189 # left side 180 # left side
190 Preferences.setUI( 181 Preferences.setUI("ShowFindFileWidget", self.findReplaceCheckBox.isChecked())
191 "ShowFindFileWidget", 182 Preferences.setUI(
192 self.findReplaceCheckBox.isChecked()) 183 "ShowFindLocationWidget", self.findLocationCheckBox.isChecked()
193 Preferences.setUI( 184 )
194 "ShowFindLocationWidget", 185 Preferences.setUI("ShowTemplateViewer", self.templateViewerCheckBox.isChecked())
195 self.findLocationCheckBox.isChecked()) 186 Preferences.setUI("ShowFileBrowser", self.fileBrowserCheckBox.isChecked())
196 Preferences.setUI( 187 Preferences.setUI("ShowSymbolsViewer", self.symbolsCheckBox.isChecked())
197 "ShowTemplateViewer",
198 self.templateViewerCheckBox.isChecked())
199 Preferences.setUI(
200 "ShowFileBrowser",
201 self.fileBrowserCheckBox.isChecked())
202 Preferences.setUI(
203 "ShowSymbolsViewer",
204 self.symbolsCheckBox.isChecked())
205 # right side 188 # right side
206 Preferences.setUI( 189 Preferences.setUI(
207 "ShowCodeDocumentationViewer", 190 "ShowCodeDocumentationViewer",
208 self.codeDocumentationViewerCheckBox.isChecked()) 191 self.codeDocumentationViewerCheckBox.isChecked(),
209 Preferences.setUI( 192 )
210 "ShowInternalHelpViewer", 193 Preferences.setUI("ShowInternalHelpViewer", self.helpViewerCheckBox.isChecked())
211 self.helpViewerCheckBox.isChecked()) 194 Preferences.setUI("ShowCondaPackageManager", self.condaCheckBox.isChecked())
212 Preferences.setUI( 195 Preferences.setUI("ShowPyPIPackageManager", self.pypiCheckBox.isChecked())
213 "ShowCondaPackageManager", 196 Preferences.setUI("ShowCooperation", self.cooperationCheckBox.isChecked())
214 self.condaCheckBox.isChecked()) 197 Preferences.setUI("ShowIrc", self.ircCheckBox.isChecked())
215 Preferences.setUI( 198 Preferences.setUI("ShowMicroPython", self.microPythonCheckBox.isChecked())
216 "ShowPyPIPackageManager",
217 self.pypiCheckBox.isChecked())
218 Preferences.setUI(
219 "ShowCooperation",
220 self.cooperationCheckBox.isChecked())
221 Preferences.setUI(
222 "ShowIrc",
223 self.ircCheckBox.isChecked())
224 Preferences.setUI(
225 "ShowMicroPython",
226 self.microPythonCheckBox.isChecked())
227 # bottom side 199 # bottom side
228 Preferences.setUI( 200 Preferences.setUI("ShowNumbersViewer", self.numbersCheckBox.isChecked())
229 "ShowNumbersViewer", 201
230 self.numbersCheckBox.isChecked()) 202 Preferences.setUI("IconBarSize", self.iconSizeComboBox.currentData())
231 203 Preferences.setUI("IconBarColor", self.__iconBarColor)
232 Preferences.setUI(
233 "IconBarSize",
234 self.iconSizeComboBox.currentData())
235 Preferences.setUI(
236 "IconBarColor",
237 self.__iconBarColor)
238 Preferences.setUI( 204 Preferences.setUI(
239 "CombinedLeftRightSidebar", 205 "CombinedLeftRightSidebar",
240 self.combinedLeftRightSidebarCheckBox.isChecked()) 206 self.combinedLeftRightSidebarCheckBox.isChecked(),
241 207 )
208
242 def __populateStyleCombo(self): 209 def __populateStyleCombo(self):
243 """ 210 """
244 Private method to populate the style combo box. 211 Private method to populate the style combo box.
245 """ 212 """
246 curStyle = Preferences.getUI("Style") 213 curStyle = Preferences.getUI("Style")
247 styles = sorted(QStyleFactory.keys()) 214 styles = sorted(QStyleFactory.keys())
248 self.styleComboBox.addItem(self.tr('System'), "System") 215 self.styleComboBox.addItem(self.tr("System"), "System")
249 for style in styles: 216 for style in styles:
250 self.styleComboBox.addItem(style, style) 217 self.styleComboBox.addItem(style, style)
251 currentIndex = self.styleComboBox.findData(curStyle) 218 currentIndex = self.styleComboBox.findData(curStyle)
252 if currentIndex == -1: 219 if currentIndex == -1:
253 currentIndex = 0 220 currentIndex = 0
254 self.styleComboBox.setCurrentIndex(currentIndex) 221 self.styleComboBox.setCurrentIndex(currentIndex)
255 222
256 def __populateLanguageCombo(self): 223 def __populateLanguageCombo(self):
257 """ 224 """
258 Private method to initialize the language combo box. 225 Private method to initialize the language combo box.
259 """ 226 """
260 self.languageComboBox.clear() 227 self.languageComboBox.clear()
261 228
262 fnlist = ( 229 fnlist = (
263 glob.glob("eric7_*.qm") + 230 glob.glob("eric7_*.qm")
264 glob.glob(os.path.join( 231 + glob.glob(os.path.join(getConfig("ericTranslationsDir"), "eric7_*.qm"))
265 getConfig('ericTranslationsDir'), "eric7_*.qm")) + 232 + glob.glob(os.path.join(Utilities.getConfigDir(), "eric7_*.qm"))
266 glob.glob(os.path.join(Utilities.getConfigDir(), "eric7_*.qm"))
267 ) 233 )
268 locales = {} 234 locales = {}
269 for fn in fnlist: 235 for fn in fnlist:
270 locale = os.path.basename(fn)[6:-3] 236 locale = os.path.basename(fn)[6:-3]
271 if locale not in locales: 237 if locale not in locales:
272 translator = QTranslator() 238 translator = QTranslator()
273 translator.load(fn) 239 translator.load(fn)
274 locales[locale] = ( 240 locales[locale] = translator.translate(
275 translator.translate( 241 "InterfacePage", "English", "Translate this with your language"
276 "InterfacePage", "English", 242 ) + " ({0})".format(locale)
277 "Translate this with your language") +
278 " ({0})".format(locale)
279 )
280 localeList = sorted(locales.keys()) 243 localeList = sorted(locales.keys())
281 try: 244 try:
282 uiLanguage = Preferences.getUILanguage() 245 uiLanguage = Preferences.getUILanguage()
283 if uiLanguage == "None" or uiLanguage is None: 246 if uiLanguage == "None" or uiLanguage is None:
284 currentIndex = 0 247 currentIndex = 0
287 else: 250 else:
288 currentIndex = localeList.index(uiLanguage) + 2 251 currentIndex = localeList.index(uiLanguage) + 2
289 except ValueError: 252 except ValueError:
290 currentIndex = 0 253 currentIndex = 0
291 self.languageComboBox.clear() 254 self.languageComboBox.clear()
292 255
293 self.languageComboBox.addItem("English (default)", "None") 256 self.languageComboBox.addItem("English (default)", "None")
294 self.languageComboBox.addItem(self.tr('System'), "System") 257 self.languageComboBox.addItem(self.tr("System"), "System")
295 for locale in localeList: 258 for locale in localeList:
296 self.languageComboBox.addItem(locales[locale], locale) 259 self.languageComboBox.addItem(locales[locale], locale)
297 self.languageComboBox.setCurrentIndex(currentIndex) 260 self.languageComboBox.setCurrentIndex(currentIndex)
298 261
299 @pyqtSlot() 262 @pyqtSlot()
300 def on_resetLayoutButton_clicked(self): 263 def on_resetLayoutButton_clicked(self):
301 """ 264 """
302 Private method to reset layout to factory defaults. 265 Private method to reset layout to factory defaults.
303 """ 266 """
304 Preferences.resetLayout() 267 Preferences.resetLayout()
305 268
306 @pyqtSlot() 269 @pyqtSlot()
307 def __setIconBarSamples(self): 270 def __setIconBarSamples(self):
308 """ 271 """
309 Private slot to set the colors of the icon bar color samples. 272 Private slot to set the colors of the icon bar color samples.
310 """ 273 """
311 iconBarSize = self.iconSizeComboBox.currentData() 274 iconBarSize = self.iconSizeComboBox.currentData()
312 iconSize, borderSize = EricIconBar.BarSizes[iconBarSize][:2] 275 iconSize, borderSize = EricIconBar.BarSizes[iconBarSize][:2]
313 size = iconSize + 2 * borderSize 276 size = iconSize + 2 * borderSize
314 277
315 self.sampleLabel.setFixedSize(size, size) 278 self.sampleLabel.setFixedSize(size, size)
316 self.sampleLabel.setStyleSheet( 279 self.sampleLabel.setStyleSheet(
317 EricIconBar.LabelStyleSheetTemplate 280 EricIconBar.LabelStyleSheetTemplate.format(self.__iconBarColor.name())
318 .format(self.__iconBarColor.name())) 281 )
319 self.sampleLabel.setPixmap( 282 self.sampleLabel.setPixmap(
320 UI.PixmapCache.getIcon("sbDebugViewer96") 283 UI.PixmapCache.getIcon("sbDebugViewer96").pixmap(iconSize, iconSize)
321 .pixmap(iconSize, iconSize) 284 )
322 ) 285
323
324 self.highlightedSampleLabel.setFixedSize(size, size) 286 self.highlightedSampleLabel.setFixedSize(size, size)
325 self.highlightedSampleLabel.setStyleSheet( 287 self.highlightedSampleLabel.setStyleSheet(
326 EricIconBar.LabelStyleSheetTemplate 288 EricIconBar.LabelStyleSheetTemplate.format(
327 .format(self.__iconBarColor.darker().name())) 289 self.__iconBarColor.darker().name()
290 )
291 )
328 self.highlightedSampleLabel.setPixmap( 292 self.highlightedSampleLabel.setPixmap(
329 UI.PixmapCache.getIcon("sbDebugViewer96") 293 UI.PixmapCache.getIcon("sbDebugViewer96").pixmap(iconSize, iconSize)
330 .pixmap(iconSize, iconSize) 294 )
331 ) 295
332
333 @pyqtSlot() 296 @pyqtSlot()
334 def on_iconBarButton_clicked(self): 297 def on_iconBarButton_clicked(self):
335 """ 298 """
336 Private slot to select the icon bar color. 299 Private slot to select the icon bar color.
337 """ 300 """
339 # Set current colour last to avoid conflicts with alpha channel 302 # Set current colour last to avoid conflicts with alpha channel
340 colDlg.setCurrentColor(self.__iconBarColor) 303 colDlg.setCurrentColor(self.__iconBarColor)
341 if colDlg.exec() == QDialog.DialogCode.Accepted: 304 if colDlg.exec() == QDialog.DialogCode.Accepted:
342 self.__iconBarColor = colDlg.selectedColor() 305 self.__iconBarColor = colDlg.selectedColor()
343 self.__setIconBarSamples() 306 self.__setIconBarSamples()
344 307
345 @pyqtSlot(bool) 308 @pyqtSlot(bool)
346 def on_combinedLeftRightSidebarCheckBox_toggled(self, checked): 309 def on_combinedLeftRightSidebarCheckBox_toggled(self, checked):
347 """ 310 """
348 Private slot handling a change of the combined sidebars checkbox. 311 Private slot handling a change of the combined sidebars checkbox.
349 312
350 @param checked state of the checkbox 313 @param checked state of the checkbox
351 @type bool 314 @type bool
352 """ 315 """
353 self.leftRightGroupBox.setTitle( 316 self.leftRightGroupBox.setTitle(
354 self.tr("Combined Left Side") 317 self.tr("Combined Left Side") if checked else self.tr("Right Side")
355 if checked else
356 self.tr("Right Side")
357 ) 318 )
358 319
359 320
360 def create(dlg): 321 def create(dlg):
361 """ 322 """
362 Module function to create the configuration page. 323 Module function to create the configuration page.
363 324
364 @param dlg reference to the configuration dialog 325 @param dlg reference to the configuration dialog
365 @return reference to the instantiated page (ConfigurationPageBase) 326 @return reference to the instantiated page (ConfigurationPageBase)
366 """ 327 """
367 page = InterfacePage() 328 page = InterfacePage()
368 return page 329 return page

eric ide

mercurial