264 self.sbLang = sbLanguage |
264 self.sbLang = sbLanguage |
265 self.sbEol = sbEol |
265 self.sbEol = sbEol |
266 self.sbZoom = sbZoom |
266 self.sbZoom = sbZoom |
267 self.sbZoom.valueChanged.connect(self.__zoom) |
267 self.sbZoom.valueChanged.connect(self.__zoom) |
268 self.__setSbFile(zoom=0) |
268 self.__setSbFile(zoom=0) |
|
269 |
|
270 self.sbLang.clicked.connect(self.__showLanguagesMenu) |
|
271 self.sbEol.clicked.connect(self.__showEolMenu) |
|
272 self.sbEnc.clicked.connect(self.__showEncodingsMenu) |
|
273 |
|
274 ################################################################## |
|
275 ## Below are menu handling methods for status bar labels |
|
276 ################################################################## |
|
277 |
|
278 def __showLanguagesMenu(self, pos): |
|
279 """ |
|
280 Private slot to show the Languages menu of the current editor. |
|
281 |
|
282 @param pos position the menu should be shown at (QPoint) |
|
283 """ |
|
284 aw = self.activeWindow() |
|
285 if aw is not None: |
|
286 menu = aw.getMenu("Languages") |
|
287 if menu is not None: |
|
288 menu.exec_(pos) |
|
289 |
|
290 def __showEolMenu(self, pos): |
|
291 """ |
|
292 Private slot to show the EOL menu of the current editor. |
|
293 |
|
294 @param pos position the menu should be shown at (QPoint) |
|
295 """ |
|
296 aw = self.activeWindow() |
|
297 if aw is not None: |
|
298 menu = aw.getMenu("Eol") |
|
299 if menu is not None: |
|
300 menu.exec_(pos) |
|
301 |
|
302 def __showEncodingsMenu(self, pos): |
|
303 """ |
|
304 Private slot to show the Encodings menu of the current editor. |
|
305 |
|
306 @param pos position the menu should be shown at (QPoint) |
|
307 """ |
|
308 aw = self.activeWindow() |
|
309 if aw is not None: |
|
310 menu = aw.getMenu("Encodings") |
|
311 if menu is not None: |
|
312 menu.exec_(pos) |
269 |
313 |
270 ########################################################################### |
314 ########################################################################### |
271 ## methods below need to be implemented by a subclass |
315 ## methods below need to be implemented by a subclass |
272 ########################################################################### |
316 ########################################################################### |
273 |
317 |