eric6/Preferences/ConfigurationDialog.py

branch
without_py2_and_pyqt4
changeset 7201
6b42677d7043
parent 7196
ab0a91b82b37
child 7229
53054eb5b15a
equal deleted inserted replaced
7200:ebab8ba287e6 7201:6b42677d7043
10 from __future__ import unicode_literals 10 from __future__ import unicode_literals
11 11
12 import os 12 import os
13 import types 13 import types
14 14
15 from PyQt5.QtCore import pyqtSignal, pyqtSlot, PYQT_VERSION, Qt, QMetaObject, \ 15 from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QMetaObject, QRect
16 QRect
17 from PyQt5.QtGui import QPixmap 16 from PyQt5.QtGui import QPixmap
18 from PyQt5.QtWidgets import QSizePolicy, QSpacerItem, QWidget, QTreeWidget, \ 17 from PyQt5.QtWidgets import QSizePolicy, QSpacerItem, QWidget, QTreeWidget, \
19 QStackedWidget, QDialog, QSplitter, QScrollArea, QApplication, \ 18 QStackedWidget, QDialog, QSplitter, QScrollArea, QApplication, \
20 QDialogButtonBox, QFrame, QVBoxLayout, QTreeWidgetItem, QLabel 19 QDialogButtonBox, QFrame, QVBoxLayout, QTreeWidgetItem, QLabel
21 20
22 from E5Gui.E5Application import e5App 21 from E5Gui.E5Application import e5App
23 from E5Gui.E5LineEdit import E5ClearableLineEdit 22 from E5Gui.E5LineEdit import E5ClearableLineEdit
24 from E5Gui import E5MessageBox 23 from E5Gui import E5MessageBox
25 from E5Gui.E5MainWindow import E5MainWindow 24 from E5Gui.E5MainWindow import E5MainWindow
26 25
27 from Globals import isMacPlatform, qVersionTuple, getWebBrowserSupport 26 from Globals import isMacPlatform, getWebBrowserSupport
28 27
29 import Preferences 28 import Preferences
30 29
31 import UI.PixmapCache 30 import UI.PixmapCache
32 31
364 "WebBrowserFlashCookieManagerPage", "0webBrowserPage", 363 "WebBrowserFlashCookieManagerPage", "0webBrowserPage",
365 None], 364 None],
366 "webBrowserVirusTotalPage": 365 "webBrowserVirusTotalPage":
367 [self.tr("VirusTotal Interface"), "virustotal.png", 366 [self.tr("VirusTotal Interface"), "virustotal.png",
368 "WebBrowserVirusTotalPage", "0webBrowserPage", None], 367 "WebBrowserVirusTotalPage", "0webBrowserPage", None],
368 "webBrowserSpellCheckingPage":
369 [self.tr("Spell checking"),
370 "preferences-spellchecking.png",
371 "WebBrowserSpellCheckingPage", "0webBrowserPage",
372 None],
369 }) 373 })
370 if qVersionTuple() >= (5, 8, 0) and PYQT_VERSION >= 0x50800:
371 self.configItems.update({
372 "webBrowserSpellCheckingPage":
373 [self.tr("Spell checking"),
374 "preferences-spellchecking.png",
375 "WebBrowserSpellCheckingPage", "0webBrowserPage",
376 None],
377 })
378 374
379 self.configItems.update( 375 self.configItems.update(
380 e5App().getObject("PluginManager").getPluginConfigData()) 376 e5App().getObject("PluginManager").getPluginConfigData())
381 377
382 elif displayMode == ConfigurationWidget.WebBrowserMode: 378 elif displayMode == ConfigurationWidget.WebBrowserMode:
417 "flashCookie16.png", 413 "flashCookie16.png",
418 "WebBrowserFlashCookieManagerPage", None, None], 414 "WebBrowserFlashCookieManagerPage", None, None],
419 "webBrowserVirusTotalPage": 415 "webBrowserVirusTotalPage":
420 [self.tr("VirusTotal Interface"), "virustotal.png", 416 [self.tr("VirusTotal Interface"), "virustotal.png",
421 "WebBrowserVirusTotalPage", None, None], 417 "WebBrowserVirusTotalPage", None, None],
418
419 "webBrowserSpellCheckingPage":
420 [self.tr("Spell checking"),
421 "preferences-spellchecking.png",
422 "WebBrowserSpellCheckingPage", None, None],
422 } 423 }
423
424 if qVersionTuple() >= (5, 8, 0) and PYQT_VERSION >= 0x50800:
425 self.configItems.update({
426 "webBrowserSpellCheckingPage":
427 [self.tr("Spell checking"),
428 "preferences-spellchecking.png",
429 "WebBrowserSpellCheckingPage", None, None],
430 })
431 424
432 elif displayMode == ConfigurationWidget.TrayStarterMode: 425 elif displayMode == ConfigurationWidget.TrayStarterMode:
433 self.configItems = { 426 self.configItems = {
434 # key : [display string, pixmap name, dialog module name or 427 # key : [display string, pixmap name, dialog module name or
435 # page creation function, parent key, 428 # page creation function, parent key,

eric ide

mercurial