65 class WebBrowserWindow(E5MainWindow): |
65 class WebBrowserWindow(E5MainWindow): |
66 """ |
66 """ |
67 Class implementing the web browser main window. |
67 Class implementing the web browser main window. |
68 |
68 |
69 @signal webBrowserClosed() emitted after the window was requested to close |
69 @signal webBrowserClosed() emitted after the window was requested to close |
70 @signal zoomTextOnlyChanged(bool) emitted after the zoom text only setting |
|
71 was changed |
|
72 """ |
70 """ |
73 webBrowserClosed = pyqtSignal() |
71 webBrowserClosed = pyqtSignal() |
74 |
72 |
75 BrowserWindows = [] |
73 BrowserWindows = [] |
76 |
74 |
160 from .QtHelp.HelpIndexWidget import HelpIndexWidget |
158 from .QtHelp.HelpIndexWidget import HelpIndexWidget |
161 from .QtHelp.HelpSearchWidget import HelpSearchWidget |
159 from .QtHelp.HelpSearchWidget import HelpSearchWidget |
162 from .WebBrowserView import WebBrowserView |
160 from .WebBrowserView import WebBrowserView |
163 from .WebBrowserTabWidget import WebBrowserTabWidget |
161 from .WebBrowserTabWidget import WebBrowserTabWidget |
164 from .AdBlock.AdBlockIcon import AdBlockIcon |
162 from .AdBlock.AdBlockIcon import AdBlockIcon |
|
163 from .StatusBar.JavaScriptIcon import JavaScriptIcon |
165 from .VirusTotal.VirusTotalApi import VirusTotalAPI |
164 from .VirusTotal.VirusTotalApi import VirusTotalAPI |
166 |
165 |
167 if not self.__fromEric: |
166 if not self.__fromEric: |
168 self.setStyle(Preferences.getUI("Style"), |
167 self.setStyle(Preferences.getUI("Style"), |
169 Preferences.getUI("StyleSheet")) |
168 Preferences.getUI("StyleSheet")) |
284 syncMgr.syncError.connect(self.statusBar().showMessage) |
283 syncMgr.syncError.connect(self.statusBar().showMessage) |
285 |
284 |
286 self.__tabWidget.newBrowser(home) |
285 self.__tabWidget.newBrowser(home) |
287 self.__tabWidget.currentBrowser().setFocus() |
286 self.__tabWidget.currentBrowser().setFocus() |
288 |
287 |
|
288 self.__javaScriptIcon = JavaScriptIcon(self) |
|
289 self.statusBar().addPermanentWidget(self.__javaScriptIcon) |
|
290 |
289 self.__adBlockIcon = AdBlockIcon(self) |
291 self.__adBlockIcon = AdBlockIcon(self) |
290 self.statusBar().addPermanentWidget(self.__adBlockIcon) |
292 self.statusBar().addPermanentWidget(self.__adBlockIcon) |
291 self.__adBlockIcon.setEnabled( |
293 self.__adBlockIcon.setEnabled( |
292 Preferences.getWebBrowser("AdBlockEnabled")) |
294 Preferences.getWebBrowser("AdBlockEnabled")) |
293 self.__tabWidget.currentChanged[int].connect( |
295 self.__tabWidget.currentChanged[int].connect( |
355 Note: This empty variant seems to get rid of the Qt message |
357 Note: This empty variant seems to get rid of the Qt message |
356 'Warning: QBasicTimer::start: QBasicTimer can only be used with |
358 'Warning: QBasicTimer::start: QBasicTimer can only be used with |
357 threads started with QThread' |
359 threads started with QThread' |
358 """ |
360 """ |
359 pass |
361 pass |
|
362 |
|
363 def tabWidget(self): |
|
364 """ |
|
365 Public method to get a reference to the tab widget. |
|
366 |
|
367 @return reference to the tab widget |
|
368 @rtype WebBrowserTabWidget |
|
369 """ |
|
370 return self.__tabWidget |
360 |
371 |
361 def fromEric(self): |
372 def fromEric(self): |
362 """ |
373 """ |
363 Public method to check, if the web browser was called from within the |
374 Public method to check, if the web browser was called from within the |
364 eric IDE. |
375 eric IDE. |
2703 self.virustotalDomainReportAct.setEnabled(False) |
2714 self.virustotalDomainReportAct.setEnabled(False) |
2704 else: |
2715 else: |
2705 self.virustotalScanCurrentAct.setEnabled(True) |
2716 self.virustotalScanCurrentAct.setEnabled(True) |
2706 self.virustotalIpReportAct.setEnabled(True) |
2717 self.virustotalIpReportAct.setEnabled(True) |
2707 self.virustotalDomainReportAct.setEnabled(True) |
2718 self.virustotalDomainReportAct.setEnabled(True) |
|
2719 |
|
2720 self.__javaScriptIcon.preferencesChanged() |
2708 |
2721 |
2709 def masterPasswordChanged(self, oldPassword, newPassword): |
2722 def masterPasswordChanged(self, oldPassword, newPassword): |
2710 """ |
2723 """ |
2711 Public slot to handle the change of the master password. |
2724 Public slot to handle the change of the master password. |
2712 |
2725 |