Ignore:
Timestamp:
04/09/13 12:19:18 (12 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Small fixes to widget development documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/extend-widgets/rst/settings.rst

    r11424 r11439  
    175175should be a corresponding widget's attribute recording the check box's 
    176176state so that when the user changes a check box, the attribute changes 
    177 and vice-versa. Although you can create such a link manually, you 
    178 should always use the module :doc:`OWGUI <owgui>` instead; 
    179 for instance, for a check box, use :obj:`OWGUI.checkBox` and not 
    180 simply the Qt's :obj:`QCheckBox`. 
     177and vice-versa. You can create such a link manually, or you can use 
     178the :doc:`OWGUI <owgui>` module instead; for instance, for a check 
     179box, use :func:`OWGUI.checkBox`. 
    181180 
    182181The settings fall into two groups. Some of them do not depend on 
    183182the data, while other are context-dependent. For the first to be saved 
    184183properly, you only need to list them in the :obj:`settingsList` 
    185 in the widget definition, as already described :doc:`elsewhere <settings>` 
     184in the widget definition, as already described. 
     185 
     186 
     187.. module:: OWContexts 
    186188 
    187189************************** 
     
    204206Saving, loading and matching contexts is taken care of by context 
    205207handlers. Currently, there are only two classes of context handlers 
    206 implemented. The first one is the abstract :obj:`ContextHandler` 
    207 and the second one is :obj:`DomainContextHandler` in which the 
     208implemented. The first one is the abstract :class:`ContextHandler` 
     209and the second one is :class:`DomainContextHandler` in which the 
    208210context is defined by the data set domain and where the settings 
    209211contain attribute names. The latter should cover most of your needs, 
     
    211213classes from it. There may even be some cases in which the context is 
    212214not defined by the domain, in which case the 
    213 :obj:`ContextHandler` will be used as a base for your new 
     215:class:`ContextHandler` will be used as a base for your new 
    214216handler. 
    215217 
     
    217219closing usually takes place (in the opposite order) in the function 
    218220that handles the data signal. This is how it looks in the scatter plot 
    219 (the code is somewhat simplified for clarity). :: 
     221(the code is somewhat simplified for clarity). 
     222 
     223:: 
    220224 
    221225    def cdata(self, data, clearResults = 1): 
     
    269273 
    270274Except for declaring the context settings, that is. Scatter plot has this just 
    271 below the :obj:`settingsList`:: 
     275below the :obj:`settingsList` :: 
    272276 
    273277    contextHandlers = {"": DomainContextHandler("", 
     
    298302same flags, so they can be grouped into :obj:`(["attrLabel", 
    299303"attrShape", "attrSize"], DomainContextHandler.Optional)`. So 
    300 what scatter plot really says is :: 
     304what scatter plot really says is:: 
    301305 
    302306    contextHandlers = {"": DomainContextHandler("", [ 
Note: See TracChangeset for help on using the changeset viewer.