def __init__(self, field_group=None, parent=None, iface=None):
        """Constructor."""
        # Init from parent class
        QWidget.__init__(self, parent)

        # Attributes
        self.layer = None
        self.metadata = {}
        self.parent = parent
        self.iface = iface
        self.field_group = field_group
        self.setting = QSettings()  # TODO(IS): Make dynamic

        # Main container
        self.main_layout = QVBoxLayout()

        # Inner layout
        self.header_layout = QHBoxLayout()
        self.content_layout = QHBoxLayout()
        self.footer_layout = QHBoxLayout()

        # Header
        self.header_label = QLabel()
        self.header_label.setWordWrap(True)

        # Content
        self.field_layout = QVBoxLayout()
        self.parameter_layout = QHBoxLayout()

        self.field_description = QLabel(tr('List of fields'))

        self.field_list = QListWidget()
        self.field_list.setSelectionMode(QAbstractItemView.ExtendedSelection)
        self.field_list.setDragDropMode(QAbstractItemView.DragDrop)
        self.field_list.setDefaultDropAction(Qt.MoveAction)

        self.field_list.setSizePolicy(
            QSizePolicy.Maximum, QSizePolicy.Expanding)
        # noinspection PyUnresolvedReferences
        self.field_list.itemSelectionChanged.connect(self.update_footer)

        # Footer
        self.footer_label = QLabel()
        self.footer_label.setWordWrap(True)

        # Parameters
        self.extra_parameters = [
            (GroupSelectParameter, GroupSelectParameterWidget)
        ]

        self.parameters = []
        self.parameter_container = None

        # Adding to layout
        self.header_layout.addWidget(self.header_label)

        self.field_layout.addWidget(self.field_description)
        self.field_layout.addWidget(self.field_list)
        self.field_layout.setSizeConstraint(QLayout.SetMaximumSize)

        self.content_layout.addLayout(self.field_layout)
        self.content_layout.addLayout(self.parameter_layout)

        self.footer_layout.addWidget(self.footer_label)

        self.main_layout.addLayout(self.header_layout)
        self.main_layout.addLayout(self.content_layout)
        self.main_layout.addLayout(self.footer_layout)

        self.setLayout(self.main_layout)
def __init__ ( self , field_group = None , parent = None , iface = None ) : QWidget . __init__ ( self , parent ) self . layer = None self . metadata = { } self . parent = parent self . iface = iface self . field_group = field_group self . setting = QSettings ( ) self . main_layout = QVBoxLayout ( ) self . header_layout = QHBoxLayout ( ) self . content_layout = QHBoxLayout ( ) self . footer_layout = QHBoxLayout ( ) self . header_label = QLabel ( ) self . header_label . setWordWrap ( True ) self . field_layout = QVBoxLayout ( ) self . parameter_layout = QHBoxLayout ( ) self . field_description = QLabel ( tr ( 'List of fields' ) ) self . field_list = QListWidget ( ) self . field_list . setSelectionMode ( QAbstractItemView . ExtendedSelection ) self . field_list . setDragDropMode ( QAbstractItemView . DragDrop ) self . field_list . setDefaultDropAction ( Qt . MoveAction ) self . field_list . setSizePolicy ( QSizePolicy . Maximum , QSizePolicy . Expanding ) self . field_list . itemSelectionChanged . connect ( self . update_footer ) self . footer_label = QLabel ( ) self . footer_label . setWordWrap ( True ) self . extra_parameters = [ ( GroupSelectParameter , GroupSelectParameterWidget ) ] self . parameters = [ ] self . parameter_container = None self . header_layout . addWidget ( self . header_label ) self . field_layout . addWidget ( self . field_description ) self . field_layout . addWidget ( self . field_list ) self . field_layout . setSizeConstraint ( QLayout . SetMaximumSize ) self . content_layout . addLayout ( self . field_layout ) self . content_layout . addLayout ( self . parameter_layout ) self . footer_layout . addWidget ( self . footer_label ) self . main_layout . addLayout ( self . header_layout ) self . main_layout . addLayout ( self . content_layout ) self . main_layout . addLayout ( self . footer_layout ) self . setLayout ( self . main_layout )
Constructor.