Example #1
0
 def __init__(self, resources):
     RulesetDialog.__init__(self, resources.window)
     self.compatibility = self.window.compatibility
     self.resources = resources
     self.ruleset = resources.window.ruleset
     self.ipv6 = None
     self.setupWindow()
Example #2
0
 def __init__(self, window):
     RulesetDialog.__init__(self, window)
     self.setupUi(self)
     self.connectButtons(self.buttonBox)
     self.setRegExpValidator(self.identifier_text, IDENTIFIER_REGEX)
     self.setIntValidator(self.duration_text, 0, 2**32 - 1)
     self.object_id = None
Example #3
0
 def __init__(self, window):
     RulesetDialog.__init__(self, window)
     self.setupUi(self)
     self.connectButtons(self.buttonBox)
     self.setRegExpValidator(self.id_text, IDENTIFIER_REGEX)
     self.setRegExpValidator(self.path_text, QRegExp(ur'^[a-zA-Z0-9*?.:_ \\/-]+$'))
     self.object_id = None
Example #4
0
 def __init__(self, window):
     RulesetDialog.__init__(self, window)
     self.setupUi(self)
     self.connect(self.base_checkbox,
         SIGNAL("toggled(bool)"),
         self.toggleBase)
     self.toggleBase(self.base_checkbox.isChecked())
Example #5
0
 def __init__(self, window):
     RulesetDialog.__init__(self, window)
     self.setupUi(self)
     self.connectButtons(self.buttonBox)
     self.setRegExpValidator(self.id_text, IDENTIFIER_REGEX)
     self.object_id = None
     self.typeother_text.setVisible(False)
     self.connect(self.type_combo, SIGNAL("currentIndexChanged(int)"), self.selectType)
     self.selectType(0)
Example #6
0
 def __init__(self, window):
     RulesetDialog.__init__(self, window)
     self.setupUi(self)
     self.connectButtons(self.buttonBox)
     self.setRegExpValidator(self.identifier_text, IDENTIFIER_REGEX)
     self.object_id = None
     self.time_from_combo.clear()
     self.time_to_combo.clear()
     for hour in xrange(24):
         self.time_from_combo.addItem(tr("%sh00") % hour)
         self.time_to_combo.addItem(tr("%sh59") % hour)
Example #7
0
    def __init__(self, window, controler, chain):
        RulesetDialog.__init__(self, window)
        self.setupUi(self)
        self.controler = controler
        self.default_decisions = chain.default_decisions
        self.chain_key = chain.key

        decision, use_log = self.default_decisions.get(self.chain_key)
        fillDecisionCombo(self.decision_combo)
        self.header_label.setText(tr("Change the default decision of the %s chain:") % unicode(chain))
        QComboBox_setCurrentText(self.decision_combo, decision)
        self.log_checkbox.setChecked(use_log)
Example #8
0
    def __init__(self, window):
        RulesetDialog.__init__(self, window)
        self.compatibility = window.compatibility
        self.setupUi(self)
        self.connectButtons(self.buttonBox)
        self.object_id = None
        self.all_groups = None   # list of (name, gid)
        self.connect(self.search_button, SIGNAL("clicked()"), self.searchEvent)
        self.connect(self.refresh_button, SIGNAL("clicked()"), self.refreshEvent)
        self.connect(self.name_list.selectionModel(),
            SIGNAL("selectionChanged(QItemSelection, QItemSelection)"),
            self.nameChanged)
        self.autofill_identifier = True

        self.setRegExpValidator(self.id_text, IDENTIFIER_REGEX)
        if not self.compatibility.user_group_name:
            self.setNonEmptyValidator(self.number_text)
        self.setNonEmptyValidator(self.name_text)
Example #9
0
    def __init__(self, window):
        RulesetDialog.__init__(self, window, accept=self.save)
        self.object_id = None
        self.widget_prefix = 'platform_edit'
        self.identifier = self.getWidget('identifier_text')
        self.setRegExpValidator(self.identifier, IDENTIFIER_REGEX)

        self.connectOkButton(self.getWidget('save_button'))
        self.window.connect(self.getWidget('cancel_button'), SIGNAL("clicked()"), self.stopEdit)

        # Configure objects
        edit_list = self.getWidget('list')
        edit_list.setDropMimeData(dropMimeData)
        edit_list.listEditView.acceptableInput = instancemethod(acceptableInput,
            edit_list.listEditView, ListEditView)
        self.connect(edit_list, SIGNAL('sectionClicked(int)'), self.platformEditHeaderClicked)
        self.connect(edit_list, SIGNAL('clicked(QModelIndex)'), self.platformEditItemClicked)
        self.connect(edit_list, SIGNAL('dataChanged(QModelIndex,QModelIndex)'),
            lambda xindex, yindex: self.updateWidget(self.getWidget('list').listEditView))
        self.connect(edit_list, SIGNAL('rowsRemoved(QModelIndex,int,int)'),
            lambda parent, xindex, yindex: self.updateWidget(self.getWidget('list').listEditView))
        self.addInputWidget(edit_list.listEditView)
Example #10
0
 def __init__(self, window):
     RulesetDialog.__init__(self, window)
     self.object_id = None
     self.setupWindow()
     self.sport_selection = PortSelection(self, "sport_")
     self.dport_selection = PortSelection(self, "dport_")
Example #11
0
 def __init__(self, window, save_callback):
     self.ui = Ui_Dialog()
     RulesetDialog.__init__(self, window)
     self.ui.setupUi(self)
     self.setupDialog()
     self.save_callback = save_callback
Example #12
0
 def __init__(self, window):
     RulesetDialog.__init__(self, window)
     self.setupUi(self)
     self.ruleset = window.ruleset
     self.rule_id = None
     self.rule_order = None