WebBrowser/WebBrowserTabBar.py

branch
QtWebEngine
changeset 4726
c26e2a2dc0cb
parent 4715
79009bc4acd5
child 4779
173e0d2ab1f9
equal deleted inserted replaced
4725:b19ff70ba509 4726:c26e2a2dc0cb
84 return 84 return
85 85
86 super(WebBrowserTabBar, self).mouseMoveEvent(evt) 86 super(WebBrowserTabBar, self).mouseMoveEvent(evt)
87 87
88 # TODO: page preview 88 # TODO: page preview
89 ## if Preferences.getHelp("ShowPreview"): 89 ## if Preferences.getWebBrowser("ShowPreview"):
90 ## # Find the tab under the mouse 90 ## # Find the tab under the mouse
91 ## i = 0 91 ## i = 0
92 ## tabIndex = -1 92 ## tabIndex = -1
93 ## while i < self.count() and tabIndex == -1: 93 ## while i < self.count() and tabIndex == -1:
94 ## if self.tabRect(i).contains(evt.pos()): 94 ## if self.tabRect(i).contains(evt.pos()):
115 Protected method to handle leave events. 115 Protected method to handle leave events.
116 116
117 @param evt reference to the leave event (QEvent) 117 @param evt reference to the leave event (QEvent)
118 """ 118 """
119 # TODO: page preview 119 # TODO: page preview
120 ## if Preferences.getHelp("ShowPreview"): 120 ## if Preferences.getWebBrowser("ShowPreview"):
121 ## # If leave tabwidget then hide previous tab preview 121 ## # If leave tabwidget then hide previous tab preview
122 ## if self.__previewPopup is not None: 122 ## if self.__previewPopup is not None:
123 ## self.__previewPopup.hide() 123 ## self.__previewPopup.hide()
124 ## self.__currentTabPreviewIndex = -1 124 ## self.__currentTabPreviewIndex = -1
125 125
130 Protected method to handle mouse press events. 130 Protected method to handle mouse press events.
131 131
132 @param evt reference to the mouse press event (QMouseEvent) 132 @param evt reference to the mouse press event (QMouseEvent)
133 """ 133 """
134 # TODO: page preview 134 # TODO: page preview
135 ## if Preferences.getHelp("ShowPreview"): 135 ## if Preferences.getWebBrowser("ShowPreview"):
136 ## if self.__previewPopup is not None: 136 ## if self.__previewPopup is not None:
137 ## self.__previewPopup.hide() 137 ## self.__previewPopup.hide()
138 ## self.__currentTabPreviewIndex = -1 138 ## self.__currentTabPreviewIndex = -1
139 139
140 super(WebBrowserTabBar, self).mousePressEvent(evt) 140 super(WebBrowserTabBar, self).mousePressEvent(evt)
149 @param evt reference to the event to be handled (QEvent) 149 @param evt reference to the event to be handled (QEvent)
150 @return flag indicating, if the event was handled (boolean) 150 @return flag indicating, if the event was handled (boolean)
151 """ 151 """
152 # TODO: page preview 152 # TODO: page preview
153 ## if evt.type() == QEvent.ToolTip and \ 153 ## if evt.type() == QEvent.ToolTip and \
154 ## Preferences.getHelp("ShowPreview"): 154 ## Preferences.getWebBrowser("ShowPreview"):
155 ## # suppress tool tips if we are showing previews 155 ## # suppress tool tips if we are showing previews
156 ## evt.setAccepted(True) 156 ## evt.setAccepted(True)
157 ## return True 157 ## return True
158 158
159 return super(WebBrowserTabBar, self).event(evt) 159 return super(WebBrowserTabBar, self).event(evt)
164 164
165 @param index index of the removed tab (integer) 165 @param index index of the removed tab (integer)
166 """ 166 """
167 pass 167 pass
168 # TODO: page preview 168 # TODO: page preview
169 ## if Preferences.getHelp("ShowPreview"): 169 ## if Preferences.getWebBrowser("ShowPreview"):
170 ## if self.__previewPopup is not None: 170 ## if self.__previewPopup is not None:
171 ## self.__previewPopup.hide() 171 ## self.__previewPopup.hide()
172 ## self.__currentTabPreviewIndex = -1 172 ## self.__currentTabPreviewIndex = -1

eric ide

mercurial