def __init__(self, parent=None, id=-1, name ='', host="", port=3306,
                 user="", passwd="", db="", create=True):
        QtGui.QDialog.__init__(self,parent)
        if create:
            self.setWindowTitle("Create a new connection")
        else:
            self.setWindowTitle("Update a connection")
            
        mainLayout = QtGui.QVBoxLayout()
        infoLayout = QtGui.QGridLayout()
        self.id = id
        nameLabel = QtGui.QLabel("Save as Connection Name:", self)
        self.nameEdt = QtGui.QLineEdit(name, self)
        hostLabel = QtGui.QLabel("Server Hostname:", self)
        self.hostEdt = QtGui.QLineEdit(host, self)
        portLabel = QtGui.QLabel("Port:", self)
        self.portEdt = QtGui.QSpinBox(self)
        self.portEdt.setMaximum(65535)
        self.portEdt.setValue(port)
        userLabel = QtGui.QLabel("Username:", self)
        self.userEdt = QtGui.QLineEdit(user, self)
        passwdLabel = QtGui.QLabel("Password:", self)
        self.passwdEdt = QtGui.QLineEdit(passwd,self)
        self.passwdEdt.setEchoMode(QtGui.QLineEdit.Password)
        self.passwdEdt.setToolTip("For your protection, your "
                                  "password will not be saved.")
        databaseLabel = QtGui.QLabel("Database:", self)
        self.databaseEdt = QtGui.QLineEdit(db,self)
        mainLayout.addLayout(infoLayout)
        infoLayout.addWidget(nameLabel,0,0,1,1)
        infoLayout.addWidget(self.nameEdt,0,1,1,1)
        infoLayout.addWidget(hostLabel,1,0,1,1)
        infoLayout.addWidget(self.hostEdt,1,1,1,1)
        infoLayout.addWidget(portLabel,1,2,1,1)
        infoLayout.addWidget(self.portEdt,1,3,1,1)
        infoLayout.addWidget(userLabel,2,0,1,1)
        infoLayout.addWidget(self.userEdt,2,1,1,3)
        infoLayout.addWidget(passwdLabel,3,0,1,1)
        infoLayout.addWidget(self.passwdEdt,3,1,1,3)
        infoLayout.addWidget(databaseLabel,4,0,1,1)
        infoLayout.addWidget(self.databaseEdt,4,1,1,3)
        
        buttonsLayout = QtGui.QHBoxLayout()
        if create:
            caption = 'Create'
        else:
            caption = 'Update'
        self.createButton = QtGui.QPushButton(caption, self)
        self.createButton.setDefault(True)
        self.cancelButton = QtGui.QPushButton('Cancel', self)
        self.testButton = QtGui.QPushButton('Test', self)
        
        buttonsLayout.addStretch(1)
        buttonsLayout.addWidget(self.cancelButton)
        buttonsLayout.addWidget(self.testButton)
        buttonsLayout.addWidget(self.createButton)

        mainLayout.addLayout(buttonsLayout)

        self.setLayout(mainLayout)
        self.connectSignals()
        self.updateButtons()
returns a mapping of filters to methods
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/open_db_window.py/QConnectionDBSetupWindow.__init__--crossover with--dataset/ETHPy150Open openshift/openshift-ansible/filter_plugins/openshift_node.py/FilterModule.filters