view RemoteViewer/Connection.py @ 2:71c9c315cfad

rename NewConnectionDialog to Connection dialog as the dialog is actually more general
author Dirk Olmes <dirk@xanthippe.ping.de>
date Sat, 20 Sep 2014 02:50:37 +0200
parents fe8a1645b632
children 8905b45cf9fb
line wrap: on
line source


class Connection(object):
    def __init__(self):
        self.geometry = None
        self.host = None
        self.title = None
        self.type = 'vnc'
        self.user = None

    def __str__(self):
        return 'connection "{}" of type {} to {} with user {} and geometry {}'.format(self.title, self.type,  self.host, self.user, self.geometry)

    def setType(self, type):
        '''This method is connected to a slot in the GUI'''
        self.type = type

    def setHost(self, hostname):
        '''This method is connected to a slot in the GUI'''
        self.host = hostname

    def setUser(self, user):
        '''This method is connected to a slot in the GUI'''
        self.user= user

    def setGeometry(self, geometry):
        '''This method is connected to a slot in the GUI'''
        self.geometry = geometry

    def validate(self):
        pass