def __init__(self, iface):
        QtGui.QDialog.__init__(self)
        # Set up the user interface from Designer.
        self.ui = Ui_DownloadDialog()
        self.ui.setupUi(self)

        self.iface = iface

        #Set up the server connection parameter text boxes.
        self.txtServerUrl = self.ui.leServerUrl
        self.txtServerUrl.setText("http://localhost:8080/geoserver/rest")
        self.txtUsername = self.ui.leUsername
        self.txtUsername.setText("admin")
        self.txtPassword = self.ui.lePassword
        self.txtPassword.setText("geoserver")
        self.txtPassword.setEchoMode(QtGui.QLineEdit.Password)

        myButton = self.ui.pbnConnect
        QtCore.QObject.connect(myButton, QtCore.SIGNAL('clicked()'),
                               self.populateTableView)

        #Set up the table view
        #TODO: use a tree view that is folded on the workspace names
        self.tableView = self.ui.layerTreeView
        self.tableView.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
        #Set up the button
        myButton = self.ui.pbnDownload
        QtCore.QObject.connect(myButton, QtCore.SIGNAL('clicked()'),
                               self.downloadSelectedLayers)

        myButton = self.ui.pbnDownloadAdd
        QtCore.QObject.connect(myButton, QtCore.SIGNAL('clicked()'),
                               self.downloadAddLayers)