def from_serverinfo(cls, serverinfo, parent=None): host, port = parse_ip(serverinfo.address, DEFAULT_PORT) return cls(host, port, serverinfo.user, serverinfo.password, title=serverinfo.name, parent=parent)
def from_string(cls, string, login_user=None, login_pwd=None, parent=None): host, port = parse_ip(string, DEFAULT_PORT) return cls(host, port, login_user, login_pwd, parent=parent)