Ejemplo n.º 1
0
   def __fillComboBox(self):
      """ Helper method that fills the combobox with all possible sub-options.
      """
      # Clear the current combobox.
      self.mPathCB.clear()

      # Add current filter.
      current_path = self.mOption.mElement.get('id', '')
      if current_path != '':
         self.mPathCB.addItem(current_path)

      # Add a reasonable default.
      if current_path != '*':
         self.mPathCB.addItem('*')

      # Get all options paths under our referenced elements.
      paths = helpers.getPathsUnderOptions(self.mReferencedElements)

      # Add each path to the combobox.
      for path in paths:
         self.mPathCB.addItem(path)
Ejemplo n.º 2
0
    def __fillComboBox(self):
        """ Helper method that fills the combobox with all possible sub-options.
      """
        # Clear the current combobox.
        self.mPathCB.clear()

        # Add current filter.
        current_path = self.mOption.mElement.get('id', '')
        if current_path != '':
            self.mPathCB.addItem(current_path)

        # Add a reasonable default.
        if current_path != '*':
            self.mPathCB.addItem('*')

        # Get all options paths under our referenced elements.
        paths = helpers.getPathsUnderOptions(self.mReferencedElements)

        # Add each path to the combobox.
        for path in paths:
            self.mPathCB.addItem(path)
Ejemplo n.º 3
0
    def __fillComboBox(self):
        """ Helper method that fills the combobox with all possible sub-options.
      """
        # Clear the current combobox.
        self.mPathCB.clear()

        # Add current filter.
        current_path = self.mOption.mElement.get("id", "")
        if current_path != "":
            self.mPathCB.addItem(current_path)

        # Add a reasonable default.
        if "add" == self.mOption.mElement.tag and current_path != "./":
            self.mPathCB.addItem("./")
        elif "remove" == self.mOption.mElement.tag and current_path != "*":
            self.mPathCB.addItem("*")

        # Get all options paths under our referenced elements.
        paths = helpers.getPathsUnderOptions(self.mReferencedElements)

        # Add each path to the combobox.
        for path in paths:
            self.mPathCB.addItem(path)