ViewManager/ViewManager.py

changeset 1504
3e6ec85cede1
parent 1500
6ce6deb421cf
child 1509
c0b5e693b0eb
equal deleted inserted replaced
1503:4e48604157a4 1504:3e6ec85cede1
2767 """<p>Zoom out on the text. This makes the text smaller.</p>""" 2767 """<p>Zoom out on the text. This makes the text smaller.</p>"""
2768 )) 2768 ))
2769 self.zoomOutAct.triggered[()].connect(self.__zoomOut) 2769 self.zoomOutAct.triggered[()].connect(self.__zoomOut)
2770 self.viewActions.append(self.zoomOutAct) 2770 self.viewActions.append(self.zoomOutAct)
2771 2771
2772 self.zoomResetAct = E5Action(QApplication.translate('ViewManager', 'Zoom reset'),
2773 UI.PixmapCache.getIcon("zoomReset.png"),
2774 QApplication.translate('ViewManager', 'Zoom &reset'),
2775 QKeySequence(QApplication.translate('ViewManager',
2776 "Ctrl+0", "View|Zoom reset")),
2777 0,
2778 self.viewActGrp, 'vm_view_zoom_reset')
2779 self.zoomResetAct.setStatusTip(QApplication.translate('ViewManager',
2780 'Reset the zoom of the text'))
2781 self.zoomResetAct.setWhatsThis(QApplication.translate('ViewManager',
2782 """<b>Zoom reset</b>"""
2783 """<p>Reset the zoom of the text. """
2784 """This sets the zoom factor to 100%.</p>"""
2785 ))
2786 self.zoomResetAct.triggered[()].connect(self.__zoomReset)
2787 self.viewActions.append(self.zoomResetAct)
2788
2772 self.zoomToAct = E5Action(QApplication.translate('ViewManager', 'Zoom'), 2789 self.zoomToAct = E5Action(QApplication.translate('ViewManager', 'Zoom'),
2773 UI.PixmapCache.getIcon("zoomTo.png"), 2790 UI.PixmapCache.getIcon("zoomTo.png"),
2774 QApplication.translate('ViewManager', '&Zoom'), 2791 QApplication.translate('ViewManager', '&Zoom'),
2775 QKeySequence(QApplication.translate('ViewManager', 2792 QKeySequence(QApplication.translate('ViewManager',
2776 "Ctrl+#", "View|Zoom")), 2793 "Ctrl+#", "View|Zoom")),
4752 e5App().getObject("Terminal").zoomOut() 4769 e5App().getObject("Terminal").zoomOut()
4753 else: 4770 else:
4754 aw = self.activeWindow() 4771 aw = self.activeWindow()
4755 if aw: 4772 if aw:
4756 aw.zoomOut() 4773 aw.zoomOut()
4774
4775 def __zoomReset(self):
4776 """
4777 Private method to reset the zoom factor.
4778 """
4779 if QApplication.focusWidget() == e5App().getObject("Shell"):
4780 e5App().getObject("Shell").zoomTo(0)
4781 elif QApplication.focusWidget() == e5App().getObject("Terminal"):
4782 e5App().getObject("Terminal").zoomTo(0)
4783 else:
4784 aw = self.activeWindow()
4785 if aw:
4786 aw.zoomTo(0)
4757 4787
4758 def __zoom(self): 4788 def __zoom(self):
4759 """ 4789 """
4760 Private method to handle the zoom action. 4790 Private method to handle the zoom action.
4761 """ 4791 """

eric ide

mercurial