Exemple #1
0
    def __init__(self, window, rules, widget_prefix):
        ValidateWidgets.__init__(self)
        self.window = window
        self.ui = window
        self.ruleset = window.ruleset
        self.rule = None
        self.rules = rules
        self.position = None
        self.widget_prefix = widget_prefix
        self.object_list = {}
        self.enabled = None
        self.old_fullscreen = None
        self.setupWindow()

        # Create the EditList for each list of objects
        for lst_name in self.OBJECT_CLASS.OBJECT_ATTR.iterkeys():
            widget = self.getWidget(lst_name)
            libraries = self.getLibrary(lst_name)
            editor_builder = self.OBJECT_CLASS.OBJECT_ATTR[lst_name]["editor"]
            editor = editor_builder(self, widget, False, self.object_list, True, *libraries)
            if lst_name in self.OBJECT_CLASS.MANDATORY_ATTR:
                # Mandatory attribute
                editor.use_validator = True
                widget.acceptableInput = editor.acceptableInput
                self.addInputWidget(widget)
            self.object_list[lst_name] = editor

        self.highlight_list = self.object_list.copy()
        self.groupbox = self.getWidget("groupbox")
Exemple #2
0
    def __init__(self, client, parent=None, radiusserverconf=None):
        QFrame.__init__(self, parent)

        self.__client = client
        self._target = None
        self._radiusserverconf = None

        ValidateWidgets.__init__(self)
        self.setupUi(self)
        self.lineedits = self.server, self.port, self.shared_secret, self.timeout

        self.__setupvalidators()

        if radiusserverconf is None:
            radiusserverconf = RadiusConf.defaultServer()
        self.setRadiusserverconf(radiusserverconf)
Exemple #3
0
    def __init__(self, window):
        QObject.__init__(self)
        ValidateWidgets.__init__(self)
        self.connectOkButton(window.objgroup_apply_button)
        cancel = window.objgroup_cancel_button
        cancel.connect(cancel, SIGNAL("clicked()"), self.stopEdit)

        self.window = window
        self.identifier = self.window.objgroup_id_text
        self.list = self.window.objgroup_list
        self.current_group = None

        self.setRegExpValidator(self.identifier, IDENTIFIER_REGEX)
        self.edit_list = EditList(self, self.list, True, {}, False, None)
        self.list.acceptableInput = self.edit_list.acceptableInput
        self.addInputWidget(self.list)

        self.edit_list.setDeleteButton(window.objgroup_delete_button)
Exemple #4
0
 def __init__(self, window, accept=None):
     QDialog.__init__(self, window)
     if accept is None:
         accept = self.accept
     ValidateWidgets.__init__(self, accept)