Import 2017-06-07 23:51:09: master 7c97ad2c

Author Committer Branch Timestamp Parent
lassoan lassoan master 2016-07-27 17:29:57 master 0a1a258a
Changeset

ENH: Made Python interactor a docking widget

Problem:
It was always necessary to rearrange windows after showing the Python interactor so that both the console and Slicer screen.
This has to be repeated every time Slicer is started, since the Python interactor window's position was not saved.

Implemented solution:

1.Made Python interactor a docking widget (if Slicer starts with main window visible).
For single-screen configuration this allows sharing of the screen between the Python interactor and other Slicer windows.
On multi-screen configurations the interactor can be dragged to the second screen.

2.The position (which screen, where), size, and state (docked/undocked, shown/hidden) of the Python interactor window is now also saved,
so there is no need for any repositioning of the windows between sessions.

3.Ctrl-3 shows/hides the interactor (not just shows as before) and when the interactor is shown it gets keyboard focus.
It allows easy opening of the interactor, typing some text, and closing it, without the need of taking the mouse to reposition
any windows.

Also cleaned up deletion of ctkPythonConsole. As the ctkPythonConsole widget can be owned by a widget (docking window), it is not
possible to create it on the stack anymore. Instead, qSlicerApplication creates the ctkPythonConsole (similarly to qSlicerPythonManager)
and destroys it if it is not owned by a widget.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@25248 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Applications/SlicerApp/Main.cxx Diff File
mod - Applications/SlicerApp/Resources/UI/qSlicerAppMainWindow.ui Diff File
mod - Applications/SlicerApp/qSlicerAppMainWindow.cxx Diff File
mod - Applications/SlicerApp/qSlicerAppMainWindow.h Diff File
mod - Applications/SlicerApp/qSlicerAppMainWindow_p.h Diff File
mod - Base/Python/slicer/util.py Diff File
mod - Base/QTApp/qSlicerApplicationHelper.cxx Diff File
mod - Base/QTApp/qSlicerApplicationHelper.h Diff File
mod - Base/QTCore/Testing/Cxx/CMakeLists.txt Diff File
mod - Base/QTCore/Testing/Cxx/qSlicerCoreApplicationTest1.cxx Diff File
mod - Base/QTCore/qSlicerCoreApplication.cxx Diff File
mod - Base/QTCore/qSlicerCoreApplication.h Diff File
mod - Base/QTCore/qSlicerCoreApplication_p.h Diff File
mod - Base/QTGUI/qSlicerApplication.cxx Diff File
mod - Base/QTGUI/qSlicerApplication.h Diff File