Пример #1
0
 def _addItem(self, actionID, label, icon=None, isEnabled=True):
     item = ContextMenuItemModel()
     item.setId(actionID)
     item.setLabel(label)
     item.setIsEnabled(isEnabled)
     if icon is not None:
         item.setIcon(icon)
     self.viewModel.contextMenuList.getItems().addViewModel(item)
     return
Пример #2
0
 def _addSeparator(self):
     separator = ContextMenuItemModel()
     separator.setIsSeparator(True)
     self.viewModel.contextMenuList.getItems().addViewModel(separator)