Skip to content

Commit

Permalink
add fullscreen support for QtConsole throught shortcut
Browse files Browse the repository at this point in the history
	add a toggleFullscreen action to qtconsoleapp and connect it to the
	'Ctrl+Meta+Space' shortcut (which is Command+Ctrl+Space on Mac)
	add shortcut description in %guiref

move maximize and minimize shortcut/fonction to another branch
  • Loading branch information
Carreau committed Sep 15, 2011
1 parent 9a6a3fb commit 677c8ce
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions IPython/core/usage.py
Expand Up @@ -416,6 +416,7 @@
- ``C-.``: force a kernel restart (a confirmation dialog appears).
- ``C-+``: increase font size.
- ``C--``: decrease font size.
- ``C-M-Space``: toggle full screen. (Command-Control-Space on Mac OS X)
The IPython pager
=================
Expand Down
15 changes: 14 additions & 1 deletion IPython/frontend/qt/console/qtconsoleapp.py
Expand Up @@ -98,7 +98,7 @@ def __init__(self, app, frontend, existing=False, may_close=True,
self._frontend.exit_requested.connect(self.close)
self._confirm_exit = confirm_exit
self.setCentralWidget(frontend)

#---------------------------------------------------------------------------
# QWidget interface
#---------------------------------------------------------------------------
Expand Down Expand Up @@ -461,6 +461,19 @@ def initialize(self, argv=None):
self.init_kernel_manager()
self.init_qt_elements()
self.init_colors()
self.init_window_shortcut()

def init_window_shortcut(self):
fullScreenAction = QtGui.QAction('Toggle Full Screen', self.window)
fullScreenAction.setShortcut('Ctrl+Meta+Space')
fullScreenAction.triggered.connect(self.toggleFullScreen)
self.window.addAction(fullScreenAction)

def toggleFullScreen(self):
if not self.window.isFullScreen():
self.window.showFullScreen()
else:
self.window.showNormal()

def start(self):

Expand Down

0 comments on commit 677c8ce

Please sign in to comment.