def __init__(self, parent=None): QtGui.QListWidget.__init__(self, parent) self.__list = ExtConnectionList.getInstance(default_connections_file()) self.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) self.setIconSize(QtCore.QSize(32, 32)) self.loadConnections() self.editAct = QtGui.QAction("Edit", self) self.editAct.setStatusTip("Edit the selected connection") self.connect(self.editAct, QtCore.SIGNAL("triggered()"), self.editConnection)
def __init__(self, host, port, database, user, passwd, name=None, **kwargs): _DBLocator.__init__(self, host, port, database, user, passwd, name, **kwargs) self.__list = ExtConnectionList.getInstance(default_connections_file()) self.ext_connection_id = -1
def convert(locator): locator.__class__ = DBLocator locator.__list = ExtConnectionList.getInstance( default_connections_file())