WebBrowser/WebBrowserWindow.py

changeset 4958
ef400197e7d5
parent 4956
1496516b0f2c
child 4960
fb24ccb25ff5
equal deleted inserted replaced
4957:55c9bb589b0a 4958:ef400197e7d5
96 _greaseMonkeyManager = None 96 _greaseMonkeyManager = None
97 _notification = None 97 _notification = None
98 _featurePermissionManager = None 98 _featurePermissionManager = None
99 _flashCookieManager = None 99 _flashCookieManager = None
100 _imageSearchEngine = None 100 _imageSearchEngine = None
101 _autoScroller = None
101 102
102 def __init__(self, home, path, parent, name, fromEric=False, 103 def __init__(self, home, path, parent, name, fromEric=False,
103 initShortcutsOnly=False, searchWord=None, 104 initShortcutsOnly=False, searchWord=None,
104 private=False, qthelp=False, settingsDir=""): 105 private=False, qthelp=False, settingsDir=""):
105 """ 106 """
2680 self.historyManager().preferencesChanged() 2681 self.historyManager().preferencesChanged()
2681 2682
2682 self.__tabWidget.preferencesChanged() 2683 self.__tabWidget.preferencesChanged()
2683 2684
2684 self.searchEdit.preferencesChanged() 2685 self.searchEdit.preferencesChanged()
2686
2687 self.autoScroller().preferencesChanged()
2685 2688
2686 if not self.isPrivate(): 2689 if not self.isPrivate():
2687 profile = self.webProfile() 2690 profile = self.webProfile()
2688 if Preferences.getWebBrowser("DiskCacheEnabled"): 2691 if Preferences.getWebBrowser("DiskCacheEnabled"):
2689 profile.setHttpCacheType(QWebEngineProfile.DiskHttpCache) 2692 profile.setHttpCacheType(QWebEngineProfile.DiskHttpCache)
3462 cls._imageSearchEngine = ImageSearchEngine() 3465 cls._imageSearchEngine = ImageSearchEngine()
3463 3466
3464 return cls._imageSearchEngine 3467 return cls._imageSearchEngine
3465 3468
3466 @classmethod 3469 @classmethod
3470 def autoScroller(cls):
3471 """
3472 Class method to get a reference to the auto scroller.
3473
3474 @return reference to the auto scroller object
3475 @rtype AutoScroller
3476 """
3477 if cls._autoScroller is None:
3478 from .AutoScroll.AutoScroller import AutoScroller
3479 cls._autoScroller = AutoScroller()
3480
3481 return cls._autoScroller
3482
3483 @classmethod
3467 def mainWindow(cls): 3484 def mainWindow(cls):
3468 """ 3485 """
3469 Class method to get a reference to the main window. 3486 Class method to get a reference to the main window.
3470 3487
3471 @return reference to the main window (WebBrowserWindow) 3488 @return reference to the main window (WebBrowserWindow)

eric ide

mercurial