def __init__(self, parent=None):
     """Constructor."""
     super(PolygonComplexityDialog, self).__init__(parent)
     # Set up the user interface from Designer.
     # After setupUI you can access any designer object by doing
     # self.<objectname>, and you can use autoconnect slots - see
     # http://qt-project.org/doc/qt-4.8/designer-using-a-ui-file.html
     # #widgets-and-dialogs-with-auto-connect
     self.ui = Ui_PolygonComplexityDialogBase()
     self.ui.setupUi(self)
class PolygonComplexityDialog(QtGui.QDialog):
    def __init__(self, parent=None):
        """Constructor."""
        super(PolygonComplexityDialog, self).__init__(parent)
        # Set up the user interface from Designer.
        # After setupUI you can access any designer object by doing
        # self.<objectname>, and you can use autoconnect slots - see
        # http://qt-project.org/doc/qt-4.8/designer-using-a-ui-file.html
        # #widgets-and-dialogs-with-auto-connect
        self.ui = Ui_PolygonComplexityDialogBase()
        self.ui.setupUi(self)
        #self.ui.buttonBox.rejected.connect(self.reject)
        #self.ui.buttonBox.accepted.connect(self.accept)
        #self.ui.rdoBuffer.setChecked(True)
        #self.ui.btnBrowse.clicked.connect(self.browse)
        #self.ui.inputLayer.currentIndexChanged.connect(self.populateAttributes)

    def populateLayers( self ):
        myListA = []
        self.ui.inputLayer.clear()
        
        myListA = ftu.getLayerNames( [ qgis.QGis.Polygon ] )
        self.ui.inputLayer.addItems( myListA )