35 self.__previewPopup = None |
35 self.__previewPopup = None |
36 self.__currentTabPreviewIndex = -1 |
36 self.__currentTabPreviewIndex = -1 |
37 |
37 |
38 self.setMouseTracking(True) |
38 self.setMouseTracking(True) |
39 |
39 |
40 def __showTabPreview(self): |
40 # TODO: page preview |
41 """ |
41 ## def __showTabPreview(self): |
42 Private slot to show the tab preview. |
42 ## """ |
43 """ |
43 ## Private slot to show the tab preview. |
44 pass |
44 ## """ |
45 # TODO: page preview |
|
46 ## indexedBrowser = self.__tabWidget.browserAt( |
45 ## indexedBrowser = self.__tabWidget.browserAt( |
47 ## self.__currentTabPreviewIndex) |
46 ## self.__currentTabPreviewIndex) |
48 ## currentBrowser = self.__tabWidget.currentBrowser() |
47 ## currentBrowser = self.__tabWidget.currentBrowser() |
49 ## |
48 ## |
50 ## if indexedBrowser is None or currentBrowser is None: |
49 ## if indexedBrowser is None or currentBrowser is None: |
82 @param evt reference to the mouse move event (QMouseEvent) |
81 @param evt reference to the mouse move event (QMouseEvent) |
83 """ |
82 """ |
84 if self.count() == 1: |
83 if self.count() == 1: |
85 return |
84 return |
86 |
85 |
87 E5WheelTabBar.mouseMoveEvent(self, evt) |
86 super(WebBrowserTabBar, self).mouseMoveEvent(evt) |
88 |
87 |
89 # TODO: page preview |
88 # TODO: page preview |
90 ## if Preferences.getHelp("ShowPreview"): |
89 ## if Preferences.getHelp("ShowPreview"): |
91 ## # Find the tab under the mouse |
90 ## # Find the tab under the mouse |
92 ## i = 0 |
91 ## i = 0 |
122 ## # If leave tabwidget then hide previous tab preview |
121 ## # If leave tabwidget then hide previous tab preview |
123 ## if self.__previewPopup is not None: |
122 ## if self.__previewPopup is not None: |
124 ## self.__previewPopup.hide() |
123 ## self.__previewPopup.hide() |
125 ## self.__currentTabPreviewIndex = -1 |
124 ## self.__currentTabPreviewIndex = -1 |
126 |
125 |
127 E5WheelTabBar.leaveEvent(self, evt) |
126 super(WebBrowserTabBar, self).leaveEvent(evt) |
128 |
127 |
129 def mousePressEvent(self, evt): |
128 def mousePressEvent(self, evt): |
130 """ |
129 """ |
131 Protected method to handle mouse press events. |
130 Protected method to handle mouse press events. |
132 |
131 |
136 ## if Preferences.getHelp("ShowPreview"): |
135 ## if Preferences.getHelp("ShowPreview"): |
137 ## if self.__previewPopup is not None: |
136 ## if self.__previewPopup is not None: |
138 ## self.__previewPopup.hide() |
137 ## self.__previewPopup.hide() |
139 ## self.__currentTabPreviewIndex = -1 |
138 ## self.__currentTabPreviewIndex = -1 |
140 |
139 |
141 E5WheelTabBar.mousePressEvent(self, evt) |
140 super(WebBrowserTabBar, self).mousePressEvent(evt) |
142 |
141 |
143 def event(self, evt): |
142 def event(self, evt): |
144 """ |
143 """ |
145 Public method to handle event. |
144 Public method to handle event. |
146 |
145 |
155 ## Preferences.getHelp("ShowPreview"): |
154 ## Preferences.getHelp("ShowPreview"): |
156 ## # suppress tool tips if we are showing previews |
155 ## # suppress tool tips if we are showing previews |
157 ## evt.setAccepted(True) |
156 ## evt.setAccepted(True) |
158 ## return True |
157 ## return True |
159 |
158 |
160 return E5WheelTabBar.event(self, evt) |
159 return super(WebBrowserTabBar, self).event(evt) |
161 |
160 |
162 def tabRemoved(self, index): |
161 def tabRemoved(self, index): |
163 """ |
162 """ |
164 Public slot to handle the removal of a tab. |
163 Public slot to handle the removal of a tab. |
165 |
164 |