Skip to content
  • lassoan's avatar
    ENH: Made Python interactor a docking widget · 7c97ad2c
    lassoan authored
    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
    7c97ad2c