예제 #1
0
    def __init__(self, name, configfile):
        super(self.__class__, self).__init__()
        self.setupUi(self)
        self.connectionname = name
        # label
        common.setRessourceFile(configfile)
        self.setWindowTitle(common.getRessource("xdmcpDialogTitle"))
        self.xdmcpOKButton.setText(common.getRessource("ButtonOK"))
        self.xdmcpCancelButton.setText(common.getRessource("ButtonCancel"))
        self.xdmcpLabelName.setText(common.getRessource("configDialogLabelName"))
        self.xdmcpLabelAddress.setText(common.getRessource("configDialogLabelAddress"))
        self.xdmcpLabelPort.setText(common.getRessource("configDialogLabelPort"))
        self.xdmcpLabelResolution.setText(common.getRessource("configDialogLabelResolution"))
        self.xdmcpLabelParameter.setText(common.getRessource("configDialogLabelParameter"))
        self.xdmcpInputRepeat.setText(common.getRessource("configDialogLabelRepeat"))
        self.xdmcpLabelAlternative.setText(common.getRessource("configDialogLabelAlternative"))
        self.xdmcpInputIcon.setText(common.getRessource("configDialogLabelIcon"))
        self.xdmcpLabelIconName.setText(common.getRessource("configDialogLabelIconName"))
        # fill ComboBox
        common.fillComboBox(self, "xdmcpResolutions", self.xdmcpInputResolution)
        common.fillComboBoxConnections(self, self.xdmcpInputAlternative)
        # action
        self.xdmcpOKButton.clicked.connect(self.ButtonOK)
        self.xdmcpCancelButton.clicked.connect(self.ButtonCancel)

        if self.connectionname != "":
            # read connection parameter and fill dialog
            connection = common.readConnection(self.connectionname)
            self.xdmcpInputName.setText(self.connectionname)
            self.xdmcpInputAddress.setText(connection["address"])
            self.xdmcpInputPort.setText(connection["port"])
            self.xdmcpInputParameter.setText(connection["parameter"])
            # Resolution
            index = self.xdmcpInputResolution.findText(connection["resolution"],
                                                       QtCore.Qt.MatchFixedString)
            if index >= 0:
                self.xdmcpInputResolution.setCurrentIndex(index)
            autostart = connection["autostart"]
            # Autostart
            if autostart == "yes":
                self.xdmcpInputAutostart.setChecked(True)
            # Repeat
            repeat = connection["repeat"]
            if repeat == "yes":
                self.x2goInputRepeat.setChecked(True)
            # Alternative
            alternative = connection["alternative"]
            if alternative != "":
                index = self.xdmcpInputAlternative.findText(alternative, QtCore.Qt.MatchFixedString)
                self.xdmcpInputAlternative.setCurrentIndex(index)    
            # Icon
            icon = "no"
            if "icon" in connection:
                icon = connection["icon"]
            if icon == "yes":
                self.xdmcpInputIcon.setChecked(True)
            iconname = ""
            if "iconname" in connection:
                iconname = connection["iconname"]
            self.xdmcpInputIconName.setText(iconname)
예제 #2
0
    def __init__(self, name, configfile):
        super(self.__class__, self).__init__()
        self.setupUi(self)
        self.connectionname = name
        # label
        common.setRessourceFile(configfile)
        self.setWindowTitle(common.getRessource("sshDialogTitle"))
        self.sshOKButton.setText(common.getRessource("ButtonOK"))
        self.sshCancelButton.setText(common.getRessource("ButtonCancel"))
        self.sshLabelName.setText(common.getRessource("configDialogLabelName"))
        self.sshLabelAddress.setText(
            common.getRessource("configDialogLabelAddress"))
        self.sshLabelPort.setText(common.getRessource("configDialogLabelPort"))
        self.sshLabelLogin.setText(
            common.getRessource("configDialogLabelLogin"))
        self.sshLabelApplication.setText(
            common.getRessource("configDialogLabelApplication"))
        self.sshLabelPassword.setText(
            common.getRessource("configDialogLabelPassword"))
        self.sshLabelParameter.setText(
            common.getRessource("configDialogLabelParameter"))
        self.sshInputRepeat.setText(
            common.getRessource("configDialogLabelRepeat"))
        self.sshLabelAlternative.setText(
            common.getRessource("configDialogLabelAlternative"))
        # action
        self.sshOKButton.clicked.connect(self.ButtonOK)
        self.sshCancelButton.clicked.connect(self.ButtonCancel)
        # fill comboBox
        common.fillComboBoxConnections(self, self.sshInputAlternative)

        if self.connectionname != "":
            # read connection parameter and fill dialog
            connection = common.readConnection(self.connectionname)
            self.sshInputName.setText(self.connectionname)
            self.sshInputAddress.setText(connection["address"])
            self.sshInputPort.setText(connection["port"])
            self.sshInputLogin.setText(connection["login"])
            self.sshInputApplication.setText(connection["application"])
            self.sshInputPassword.setText(connection["password"])
            self.sshInputParameter.setText(connection["parameter"])
            autostart = connection["autostart"]
            if autostart == "yes":
                self.sshInputAutostart.setChecked(True)
            # Repeat
            repeat = connection["repeat"]
            if repeat == "yes":
                self.sshInputRepeat.setChecked(True)
            # Alternative
            alternative = connection["alternative"]
            if alternative != "":
                index = self.sshInputAlternative.findText(
                    alternative, QtCore.Qt.MatchFixedString)
                self.sshInputAlternative.setCurrentIndex(index)
예제 #3
0
    def __init__(self, name, configfile):
        super(self.__class__, self).__init__()
        self.setupUi(self)
        self.connectionname = name
        # label
        common.setRessourceFile(configfile)
        self.setWindowTitle(common.getRessource("rdesktopDialogTitle"))
        self.rdesktopOKButton.setText(common.getRessource("ButtonOK"))
        self.rdesktopCancelButton.setText(common.getRessource("ButtonCancel"))
        self.rdesktopLabelName.setText(
            common.getRessource("configDialogLabelName"))
        self.rdesktopLabelAddress.setText(
            common.getRessource("configDialogLabelAddress"))
        self.rdesktopLabelResolution.setText(
            common.getRessource("configDialogLabelResolution"))
        self.rdesktopLabelColor.setText(
            common.getRessource("configDialogLabelColor"))
        self.rdesktopLabelParameter.setText(
            common.getRessource("configDialogLabelParameter"))
        self.rdesktopInputAutostart.setText(
            common.getRessource("configDialogLabelAutostart"))
        self.rdesktopInputRepeat.setText(
            common.getRessource("configDialogLabelRepeat"))
        self.rdesktopInputSystemLogin.setText(
            common.getRessource("configDialogLabelSystemLogin"))
        self.rdesktopLabelAlternative.setText(
            common.getRessource("configDialogLabelAlternative"))
        #action
        self.rdesktopOKButton.clicked.connect(self.ButtonOK)
        self.rdesktopCancelButton.clicked.connect(self.ButtonCancel)
        # fill ComboBox
        common.fillComboBox(self, "rdesktopResolutions",
                            self.rdesktopInputResolution)
        common.fillComboBox(self, "rdesktopColorLevel",
                            self.rdesktopInputColor)
        common.fillComboBoxConnections(self, self.rdesktopInputAlternative)

        if self.connectionname != "":
            # read connection parameter and fill dialog
            connection = common.readConnection(self.connectionname)
            self.rdesktopInputName.setText(self.connectionname)
            self.rdesktopInputAddress.setText(connection["address"])
            self.rdesktopInputParameter.setText(connection["parameter"])
            # Resolution
            index = self.rdesktopInputResolution.findText(
                connection["resolution"], QtCore.Qt.MatchFixedString)
            if index >= 0:
                self.rdesktopInputResolution.setCurrentIndex(index)
            # Color
            index = self.rdesktopInputColor.findText(
                connection["color"], QtCore.Qt.MatchFixedString)
            if index >= 0:
                self.rdesktopInputColor.setCurrentIndex(index)
            # Autostart
            autostart = connection["autostart"]
            if autostart == "yes":
                self.rdesktopInputAutostart.setChecked(True)
            # Repeat
            repeat = connection["repeat"]
            if repeat == "yes":
                self.rdesktopInputRepeat.setChecked(True)
            # Own Login
            systemlogin = connection["systemlogin"]
            if systemlogin == "yes":
                self.rdesktopInputSystemLogin.setChecked(True)
            # Alternative
            alternative = connection["alternative"]
            if alternative != "":
                index = self.rdesktopInputAlternative.findText(
                    alternative, QtCore.Qt.MatchFixedString)
                self.rdesktopInputAlternative.setCurrentIndex(index)
예제 #4
0
    def __init__(self, name, configfile):
        super(self.__class__, self).__init__()
        self.setupUi(self)
        self.connectionname = name
        # label
        common.setRessourceFile(configfile)
        self.setWindowTitle(common.getRessource("x2goDialogTitle"))
        self.x2goOKButton.setText(common.getRessource("ButtonOK"))
        self.x2goCancelButton.setText(common.getRessource("ButtonCancel"))
        self.x2goLabelName.setText(common.getRessource("configDialogLabelName"))
        self.x2goLabelAddress.setText(common.getRessource("configDialogLabelAddress"))
        self.x2goLabelUser.setText(common.getRessource("configDialogLabelUser"))
        self.x2goLabelPassword.setText(common.getRessource("configDialogLabelPassword"))
        self.x2goLabelKeyboard.setText(common.getRessource("configDialogLabelKeyboard"))
        self.x2goLabelResolution.setText(common.getRessource("configDialogLabelResolution"))
        self.x2goLabelDesktop.setText(common.getRessource("configDialogLabelDesktop"))
        self.x2goLabelParameter.setText(common.getRessource("configDialogLabelParameter"))
        self.x2goInputRepeat.setText(common.getRessource("configDialogLabelRepeat"))
        self.x2goLabelAlternative.setText(common.getRessource("configDialogLabelAlternative"))
        self.x2goInputSystemLogin.setText(common.getRessource("configDialogLabelSystemLogin"))
        self.x2goInputIcon.setText(common.getRessource("configDialogLabelIcon"))
        self.x2goLabelIconName.setText(common.getRessource("configDialogLabelIconName"))        
        # fill ComboBox
        common.fillComboBox(self, "x2goResolutions", self.x2goInputResolution)
        common.fillComboBox(self, "x2goKeyboardLayout", self.x2goInputKeyboard)
        common.fillComboBox(self, "x2goDesktop", self.x2goInputDesktop)
        common.fillComboBoxConnections(self, self.x2goInputAlternative)
        # action
        self.x2goOKButton.clicked.connect(self.ButtonOK)
        self.x2goCancelButton.clicked.connect(self.ButtonCancel)

        if self.connectionname != "":
            # read connection parameter and fill dialog
            connection = common.readConnection(self.connectionname)
            self.x2goInputName.setText(self.connectionname)
            self.x2goInputAddress.setText(connection["address"])
            self.x2goInputUser.setText(connection["user"])
            self.x2goInputPassword.setText(connection["password"])
            self.x2goInputParameter.setText(connection["parameter"])
            # Keyboard layout
            index = self.x2goInputKeyboard.findText(connection["keyboard"],
                                                    QtCore.Qt.MatchFixedString)
            if index >= 0:
                self.x2goInputKeyboard.setCurrentIndex(index)
            # Resolution
            index = self.x2goInputResolution.findText(connection["resolution"],
                                                      QtCore.Qt.MatchFixedString)
            if index >= 0:
                self.x2goInputResolution.setCurrentIndex(index)
            # Desktop
            index = self.x2goInputDesktop.findText(connection["desktop"],
                                                   QtCore.Qt.MatchFixedString)
            if index >= 0:
                self.x2goInputDesktop.setCurrentIndex(index)
            # Own Login
            systemlogin = connection["systemlogin"]
            if systemlogin == "yes":
                self.x2goInputSystemLogin.setChecked(True)
            # Autostart
            autostart = connection["autostart"]
            if autostart == "yes":
                self.x2goInputAutostart.setChecked(True)
            # Repeat
            repeat = connection["repeat"]
            if repeat == "yes":
                self.x2goInputRepeat.setChecked(True)
            # Alternative
            alternative = connection["alternative"]
            if alternative != "":
                index = self.x2goInputAlternative.findText(alternative, QtCore.Qt.MatchFixedString)
                self.x2goInputAlternative.setCurrentIndex(index)    
            # Icon
            icon = "no"
            if "icon" in connection:
                icon = connection["icon"]
            if icon == "yes":
                self.x2goInputIcon.setChecked(True)
            iconname = ""
            if "iconname" in connection:
                iconname = connection["iconname"]
            self.x2goInputIconName.setText(iconname)