API Documentation

DdManager

class ddmanager.DdManager(iface)[source]

DdManager manages all masks in the current project

initLayer(layer, skip=[], labels={}, fieldOrder=[], fieldGroups={}, minMax={}, searchFields=[], showParents=True, createAction=True, db=None, inputMask=True, searchMask=True, inputUi=None, searchUi=None, helpText='')[source]

api method initLayer: initialize this layer with a data-driven input mask Returns a Boolean stating the success of the initialization Paramters: - layer [QgsVectorLayer] - skip [array [string]]: field names to not show - labels [dict] with entries: “fieldname”: “label” - fieldOrder [array[string]]: containing the field names in the order they should be shown - fieldGroups [dict] with entries: fieldName: [tabTitle, tabTooltip] for each group a tab is created and the fields from fieldName onwards (refers to fieldOrder) are grouped in this tab; tabTooltip is optional - minMax [dict] with entries: “fieldname”: [min, max] (use for numerical fields only! - searchFields [array[string]] with fields to be shown in the search form, if empty all fields are shown - showParents [Boolean] show tabs for 1-to-1 relations (parents) - createAction [Boolean]: add an action to the layer’s list of actions - db [QtSql.QSqlDatabase] - inputMask [Boolean]: create a data-edit mask - searchMask [Boolean]: create a data-search mask - inputUi [ddui.DdDialogWidget]: apply this inputUi - searchUi [ddui.DdDialogWidget]: apply this as search ui -helpText [string] help text for this mask, may be html formatted

showFeatureForm(layer, feature, showParents=True)[source]

api method showFeatureForm: show the data-driven input mask for a layer and a feature returns 1 if user clicked OK, 0 if CANCEL

addAction(layer, actionName=u'showDdForm')[source]

api method to add an action to the layer with a self defined name

removeAction(layer, actionName)[source]

api method to remove an action from the layer

setDb(layer, db)[source]

api method to set the db for a layer

setUi(layer, ui)[source]

api method to exchange the default ui with a custom ui

Table Of Contents

Previous topic

Usage

Next topic

Full Documentation

This Page