DockWidgetPanel
¶
digraph inheritancefb5e26729a {
rankdir=UD;
ratio=compress;
size="8.0, 12.0";
"BaseConfigurableClass" [color=dodgerblue1,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="A base class defining the API for configurable objects."];
"DockWidgetPanel" [color=dodgerblue1,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="This is an extended QDockWidget which provides some methods for being used"];
"QDockWidget" -> "DockWidgetPanel" [arrowsize=0.5,style="setlinewidth(0.5)"];
"TaurusBaseWidget" -> "DockWidgetPanel" [arrowsize=0.5,style="setlinewidth(0.5)"];
"Logger" [color=dodgerblue1,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="The taurus logger class. All taurus pertinent classes should inherit"];
"Object" -> "Logger" [arrowsize=0.5,style="setlinewidth(0.5)"];
"Object" [color=dodgerblue1,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded];
"QDockWidget" [color=dodgerblue1,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded];
"QWidget" -> "QDockWidget" [arrowsize=0.5,style="setlinewidth(0.5)"];
"QObject" [color=dodgerblue1,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded];
"wrapper" -> "QObject" [arrowsize=0.5,style="setlinewidth(0.5)"];
"QPaintDevice" [color=dodgerblue1,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded];
"simplewrapper" -> "QPaintDevice" [arrowsize=0.5,style="setlinewidth(0.5)"];
"QWidget" [color=dodgerblue1,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded];
"QObject" -> "QWidget" [arrowsize=0.5,style="setlinewidth(0.5)"];
"QPaintDevice" -> "QWidget" [arrowsize=0.5,style="setlinewidth(0.5)"];
"TaurusBaseComponent" [color=dodgerblue1,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="A generic Taurus component."];
"TaurusListener" -> "TaurusBaseComponent" [arrowsize=0.5,style="setlinewidth(0.5)"];
"BaseConfigurableClass" -> "TaurusBaseComponent" [arrowsize=0.5,style="setlinewidth(0.5)"];
"TaurusBaseWidget" [color=dodgerblue1,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="The base class for all Qt Taurus widgets."];
"TaurusBaseComponent" -> "TaurusBaseWidget" [arrowsize=0.5,style="setlinewidth(0.5)"];
"TaurusListener" [color=dodgerblue1,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="TaurusListener Interface"];
"Logger" -> "TaurusListener" [arrowsize=0.5,style="setlinewidth(0.5)"];
"simplewrapper" [color=dodgerblue1,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded];
"wrapper" [color=dodgerblue1,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded];
"simplewrapper" -> "wrapper" [arrowsize=0.5,style="setlinewidth(0.5)"];
}
-
class
DockWidgetPanel
(parent, widget, name, mainwindow)[source]¶ Bases:
PyQt4.QtGui.QDockWidget
,taurus.qt.qtgui.base.taurusbase.TaurusBaseWidget
This is an extended QDockWidget which provides some methods for being used as a “panel” of a TaurusGui application. Widgets of TaurusGui are inserted in the application by adding them to a DockWidgetPanel.
-
applyConfig
(configdict, depth=-1)[source]¶ applies the settings stored in a configdict to the current object.
In most usual situations, using
registerConfigProperty()
andregisterConfigDelegate()
, should be enough to cover all needs using this method, although it can be reimplemented in children classes to support very specific configurations.Parameters: - configdict (
dict
) – - depth (
int
) – If depth = 0, applyConfig will only be called for this object, and not for any other object registered viaregisterConfigurableItem()
. If depth > 0, applyConfig will be called recursively as many times as the depth value. If depth < 0 (default, see note), no limit is imposed to recursion (i.e., it will recurse for as deep as there are registered items).
Note
the default recursion depth can be tweaked in derived classes by changing the class property defaultConfigRecursionDepth
See also
- configdict (
-
createConfig
(*args, **kwargs)[source]¶ Returns a dictionary containing configuration information about the current state of the object.
In most usual situations, using
registerConfigProperty()
andregisterConfigDelegate()
, should be enough to cover all needs using this method, although it can be reimplemented in children classes to support very specific configurations.By default, meth:createQConfig and meth:saveConfigFile call to this method for obtaining the data.
Hint: The following code allows you to serialize the configuration dictionary as a string (which you can store as a QSetting, or as a Tango Attribute, provided that allowUnpickable==False):
import pickle s = pickle.dumps(widget.createConfig()) #s is a string that can be stored
Parameters: alllowUnpickable ( bool
) – if False the returned dict is guaranteed to be a pickable object. This is the default and preferred option because it allows the serialization as a string that can be directly stored in a QSetting. If True, this limitation is not enforced, which allows to use more complex objects as values (but limits its persistence).Return type: dict
<str
,object
>Returns: configurations (which can be loaded with applyConfig()
).
-