Each DdAttribute corresponds to an input widget in the mask or each input widget is based on exactly one DdAttribute.
abstract super class for all DdAttributes
a DdAttribute for field in a QGIS layer that represents a foreign key
a DdAttribute for a field in a QGIS layer
a DdAttribute for a n2m relation, subtype can be list, tree or table relationTable and relatedTable are DdTable objects
a DdAttribute that draws a pushButton in the mask. the button must be implemented as subclass of ddui.DdPushButton
Classes that make up or steer the DataDrivenUI
Bases: object
Creates the DataDrivenUi
When subclassing this class, you want to rewrite createUi and use DdManager’s setUi method to apply your custom ui to the layer
creates a default ui for this table (DdTable instance) skip is an array with field names to not show labels is a dict with entries: “fieldname”: “label” fieldOrder is an array containing the field names in the order they should be shown minMax is a dict with entries: “fieldname”: [min, max] (use for numerical fields only!
querys this table’s foreign keys and returns a dict attnum: [str: Type of the lookup field, str: sql to query lookup values, str: Name of the value field in the lookup table, str: Comment on lookup table]
find those tables (n2mtable) where our pk is a fk
Bases: ddui.DdLineEdit
input widget (QCheckBox) for a boolean field
Bases: ddui.DdLineEdit
input widget (QComboBox) for a foreign key
Bases: ddui.DdLineEdit
input widget (QDateEdit) for a date field
Bases: ddui.DdWidget
This is the mask ui
Bases: ddui.DdWidget
DdForms are the content of DdDialog, each DdDialog needs at least one DdForm (tab). The class arranges its input widgets either in a QToolBox or in the DdDialogWidget’s current tab
Bases: ddui.DdWidget
abstract super class for any input widget, corresponds to a DdAttribute
Bases: ddui.DdInputWidget
abstract class for all Input Widgets that can be represented in one line, creates a QLineEdit as default InputWidget, adds it together with a QCheckBox (to store null values) and a label to a QFormLayout.
slot: disables the input widget if the null checkbox is checked and vice versa
returns a str representing the value in this field for this feature; if the value is null, None is returned, if it is a new feature the default value is returned if available.
return the field index for this DdInputWidget’s attribute’s name in this layer
Bases: ddui.DdLineEdit
input widget (QLineEdit) for a char or varchar
Bases: ddui.DdLineEdit
input widget (QLineEdit) for a DoubleValue
Bases: ddui.DdLineEdit
input widget (QLineEdit) for an IntegerValue
Bases: object
DdManager manages all masks in the current project
api method to add an action to the layer with a self defined name
Find the index for groupName in the legend
api method initLayer: initialize the layer with a data-driven input mask Returns a Boolean stating the success of the initialization
Bases: ddui.DdN2mWidget
input widget (clickable QListWidget) for simple n2m relations
Bases: ddui.DdN2mWidget
a input widget for n-to-m relations with more than one field in the relation table The input widget consists of a QTableWidget and an add (+) and a remove (-) button
Bases: ddui.DdN2mWidget
input widget (clickable QTreeWidget) for n2m relations with more than one additional field in the related table TreeWidget is initialized directly from the DB
Bases: ddui.DdInputWidget
abstract class for any n-to-m relation
create a new QgsFeature for the relation table with this fid
Bases: ddui.DdInputWidget
abstract class, needs subclassing
Bases: ddui.DdLineEdit
input widget (QTextEdit) for a text field
Bases: object
abstract base class of all ui-widgets