Difference between revisions of "Slicer4:Layouts"

From Slicer Wiki
Jump to: navigation, search
Line 11: Line 11:
 
## Add an icon
 
## Add an icon
 
# Applications/SlicerQT/Resources/qSlicerMainWindow.ui
 
# Applications/SlicerQT/Resources/qSlicerMainWindow.ui
## Add an action to the LayoutMenu  
+
## Add an action using the Action Editor View
## Add an action to the LayoutToolbar (can these be the same action?)
+
## Drag&Drop created action into the LayoutMenu (View->Layout)
 +
## Drag&Drop created action into the LayoutToolbar
 
# Applications/SlicerQt/qSlicerMainWindow.cxx
 
# Applications/SlicerQt/qSlicerMainWindow.cxx
 
## Add a line to setupMenuActions()
 
## Add a line to setupMenuActions()
# Libs/qMRMLWidgets/qMRMLLayoutManager.h
 
## Add a method switchToXXXView()
 
## Implement switchToXX() in the header
 
# Libs/qMRMLWidgets/qMRMLLayoutWidget.h
 
## Add a method switchToXXXView()
 
# Libs/qMRMLWidgets/qMRMLLayoutWidget.cxx
 
## Implement method switchToXXXView() - Not currently used in Slicer4
 
# What about Libs/qMRMLWidgets/qMRMLLayoutManager_p.h?
 
## There are methods there to setXXX(). But there are no implementations.  Is this still used?
 

Revision as of 20:22, 1 April 2011

Home < Slicer4:Layouts

XML specification for a layout

Adding a new layout to Slicer4

  1. Libs/MRML/vtkMRMLLayoutNode.h
    1. Add an enum to the list of available layouts
  2. Libs/MRMLLogic/vtkMRMLLayoutLogic.cxx
    1. Add a string constant containing the XML describing the layout
    2. Add a line to the AddDefaultsLayouts() method
  3. Libs/qMRMLWidgets/Resources/Icons/
    1. Add an icon
  4. Applications/SlicerQT/Resources/qSlicerMainWindow.ui
    1. Add an action using the Action Editor View
    2. Drag&Drop created action into the LayoutMenu (View->Layout)
    3. Drag&Drop created action into the LayoutToolbar
  5. Applications/SlicerQt/qSlicerMainWindow.cxx
    1. Add a line to setupMenuActions()