108 _autoScroller = None |
108 _autoScroller = None |
109 _tabManager = None |
109 _tabManager = None |
110 _sessionManager = None |
110 _sessionManager = None |
111 |
111 |
112 _performingShutdown = False |
112 _performingShutdown = False |
|
113 _lastActiveWindow = None |
113 |
114 |
114 def __init__(self, home, path, parent, name, fromEric=False, |
115 def __init__(self, home, path, parent, name, fromEric=False, |
115 initShortcutsOnly=False, searchWord=None, |
116 initShortcutsOnly=False, searchWord=None, |
116 private=False, qthelp=False, settingsDir="", |
117 private=False, qthelp=False, settingsDir="", |
117 restoreSession=False): |
118 restoreSession=False): |
158 self.__initShortcutsOnly = initShortcutsOnly |
159 self.__initShortcutsOnly = initShortcutsOnly |
159 self.setWindowIcon(UI.PixmapCache.getIcon("ericWeb.png")) |
160 self.setWindowIcon(UI.PixmapCache.getIcon("ericWeb.png")) |
160 |
161 |
161 self.__mHistory = [] |
162 self.__mHistory = [] |
162 self.__lastConfigurationPageName = "" |
163 self.__lastConfigurationPageName = "" |
163 self.__lastActiveWindow = None |
|
164 |
164 |
165 WebBrowserWindow._isPrivate = private |
165 WebBrowserWindow._isPrivate = private |
166 |
166 |
167 self.__eventMouseButtons = Qt.NoButton |
167 self.__eventMouseButtons = Qt.NoButton |
168 self.__eventKeyboardModifiers = Qt.NoModifier |
168 self.__eventKeyboardModifiers = Qt.NoModifier |
4000 |
4000 |
4001 @return references to all main window (list of WebBrowserWindow) |
4001 @return references to all main window (list of WebBrowserWindow) |
4002 """ |
4002 """ |
4003 return cls.BrowserWindows |
4003 return cls.BrowserWindows |
4004 |
4004 |
4005 def __appFocusChanged(self, old, now): |
4005 @pyqtSlot() |
|
4006 def __appFocusChanged(self): |
4006 """ |
4007 """ |
4007 Private slot to handle a change of the focus. |
4008 Private slot to handle a change of the focus. |
4008 |
4009 """ |
4009 @param old reference to the widget, that lost focus (QWidget or None) |
4010 focusWindow = e5App().activeWindow() |
4010 @param now reference to the widget having the focus (QWidget or None) |
4011 if isinstance(focusWindow, WebBrowserWindow): |
4011 """ |
4012 WebBrowserWindow._lastActiveWindow = focusWindow |
4012 if isinstance(now, WebBrowserWindow): |
4013 |
4013 self.__lastActiveWindow = now |
4014 @classmethod |
4014 |
4015 def getWindow(cls): |
4015 def getWindow(self): |
4016 """ |
4016 """ |
4017 Class method to get a reference to the most recent active |
4017 Public method to get a reference to the most recent active |
|
4018 web browser window. |
4018 web browser window. |
4019 |
4019 |
4020 @return reference to most recent web browser window |
4020 @return reference to most recent web browser window |
4021 @rtype WebBrowserWindow |
4021 @rtype WebBrowserWindow |
4022 """ |
4022 """ |
4023 if self.__lastActiveWindow: |
4023 if cls._lastActiveWindow: |
4024 return self.__lastActiveWindow |
4024 return cls._lastActiveWindow |
4025 |
4025 |
4026 return self.mainWindow() |
4026 return cls.mainWindow() |
4027 |
4027 |
4028 def openSearchManager(self): |
4028 def openSearchManager(self): |
4029 """ |
4029 """ |
4030 Public method to get a reference to the opensearch manager object. |
4030 Public method to get a reference to the opensearch manager object. |
4031 |
4031 |