Full Documentation¶
Modules¶
ddattribute¶
Each DdAttribute corresponds to an input widget in the mask or each input widget is based on exactly one DdAttribute.
General rules:¶
every field has an input widget suitable for its type
no ARRAY typees are supported
supported types are: int4, int8, float, date, boolean, char, varchar, text
foreign keys are represented as comboboxes and are only supported if based on one field (exactly one fk field in the table references exactly one pk field in the referenced table)
the table referenced by a foreign key should have at least one field wit a notNull constraint apart from the primary key. This field will be used as display field in the combobox
if a varchar field is present in a table referenced by a foreign key it is used as display field in the combobox, if there are several the one defined earlier is used
if no varchar field is present any char field is used
if no varchar or char fields are available the pk field is used for display
table inheritance is not covered
if a table’s pk is a fk to another table’s pk the other table’s mask is shown in a second tab
- class ddattribute.DdAttribute(table, type, notNull, name, comment, label, min=None, max=None, enableWidget=True)[source]¶
abstract super class for all DdAttributes
- class ddattribute.DdCheckableTableAttribute(relationTable, relatedTable, comment, label, relationFeatureIdField, relationRelatedIdField, relatedIdField, relatedDisplayField, attributes, catalogTable=None, relatedCatalogIdField=None, catalogIdField=None, catalogDisplayField=None, catalogLabel=None, enableWidget=True)[source]¶
- class ddattribute.DdDateLayerAttribute(table, type, notNull, name, comment, attNum, isPK, isFK, default, hasDefault, length, label=None, min=None, max=None, dateFormat='yyyy-MM-dd', enableWidget=True, isArray=False, arrayDelim='')[source]¶
a DdAttribute for a date field in a QGIS layer if you want to specify today as min or max, simply pass “today”
- class ddattribute.DdFkLayerAttribute(table, type, notNull, name, comment, attNum, isPK, default, hasDefault, queryForCbx, label=None, enableWidget=True, whereClause='')[source]¶
a DdAttribute for field in a QGIS layer that represents a foreign key
- class ddattribute.DdGeometryAttribute(table, type, name, comment, attNum)[source]¶
a DdAttribute for a geometry field in a QGIS layer
- class ddattribute.DdLayerAttribute(table, type, notNull, name, comment, attNum, isPK, isFK, default, hasDefault, length, label=None, min=None, max=None, enableWidget=True, isArray=False, arrayDelim='', multiLine=None)[source]¶
a DdAttribute for a field in a QGIS layer
- class ddattribute.DdManyToManyAttribute(relationTable, type, relationFeatureIdField, comment, label, enableWidget=True)[source]¶
abstract class for any many2many attribute
- class ddattribute.DdN2mAttribute(relationTable, relatedTable, subType, comment, label, relationFeatureIdField, relationRelatedIdField, relatedIdField, relatedDisplayField, fieldList=[], relatedForeignKeys=[], enableWidget=True, whereClause='')[source]¶
a DdAttribute for a n2m relation, subtype can be list or tree relationTable and relatedTable are DdTable objects
- buildDisplayStatement(relationSchema, relationTable, relatedSchema, relatedTable, relationFeatureIdField, relatedIdField, relatedDisplayField, relationRelatedIdField, fieldList, whereClause)[source]¶
- class ddattribute.DdPushButtonAttribute(comment, label, enableWidget=True)[source]¶
a DdAttribute that draws a pushButton in the mask. the button must be implemented as subclass of dduserclass.DdPushButton
- class ddattribute.DdTable(oid=None, schemaName='None', tableName='None', comment='', title=None)[source]¶
holds all information for a DB table relation
- class ddattribute.DdTableAttribute(relationTable, comment, label, relationFeatureIdField, attributes, maxRows, showParents, pkAttName, enableWidget=True)[source]¶
a DdAttribute for a relationTable
dddialog¶
- class dddialog.DdDialog(ddManager, ui, layer, feature, db, multiEdit=False, parent=None, title=None)[source]¶
Each mask is a DdDialog instance, thus a child of QDialog
- class dddialog.DdSearchDialog(ui, layer, db, parent=None, root=None)[source]¶
Each searchDialog is a child of QDialog
dderror¶
Error classes