A first try is ready : files updated at OP.
You previously talk to parse a file to get the widgets. This isn't implemented (and I think won't be ATM), but you'll see tuning the tools in the status bar is more than easy.
Everything happens in the definition of the 'custBar' variable (Line 279 of current release).
It is a simple list whose each line is composed of :
Code: Select all
[Tool_Type, [Parameters]]
Thus let's say you want to add a tool button to toggle the previously described parameter, and eg. have it with label 'E', just add in the list of tools :
Code: Select all
,[custParamToggler, ['E', 'User parameter:BaseApp/Preferences/View', 'EnableSelection']]
2 extra things to notice. Firstly you're free to comment/delete any line that displays a tool that you don't want.
Secondly, 'custParamToggler' as any other tools supports middle click and right click functions (if only one is defined, it is attributed to both click types). This is added as extra parameter to the tool definition.
So let's say that you want only Visibility Tool, 'EnableSelection' parameter toggler, then Report view, Python console & Combo view togglers. Moreover, you want to keep a quick access to the Dependency Graph but a dedicated icon is too much and you want to add it as middle/right click on your parameter toggler. 'custBar' will then be like this :
Code: Select all
custBar = [
[visibilityTool, []]
,[custParamToggler, ['E', 'User parameter:BaseApp/Preferences/View', 'EnableSelection', lambda:Gui.runCommand('Std_ExportGraphviz',0)]]
,[custDockToggler, ['Report view','R', Gui.getMainWindow().findChild(QtGui.QTextEdit, 'Report view').clear]]
,[custDockToggler, ['Python console', 'Y', Gui.getMainWindow().findChild(QtGui.QPlainTextEdit, 'Python console').onClearConsole]]
,[custDockToggler, ['Combo View', 'C', getFCInfo]]
# ,[custDockToggler, ['Selection view', 'S']]
# ,[custDockToggler, ['Property view', 'P']]
# ,[custDockToggler, ['Tree view', 'T']]
# ,[custCmdRunner, ['D', ['Std_ExportGraphviz',0]]]
]
Hope that help.