def __init__(self): """ This class is the menu that shows when a wire is right-clicked. Constructing a ActionWrapperMenu creates the menu items, but does not connect any actions. To connect the menu items to internal logic, use the methods that start with "on". """ QMenu.__init__(self) self._delete = self.addAction("Delete Wire")
def __init__(self): """ This class is the menu that shows when an action menu item is right clicked in the action menu. Constructing a ActionItemMenu creates the menu items, but does not connect any actions. To connect the menu items to internal logic, use the methods that start with "on". """ QMenu.__init__(self) self._addAction = self.addAction("Add to Current Action Pipeline")
def __init__(self, parent=None): QMenu.__init__(self) action = self.addAction('Rename') action.triggered.connect(lambda x: self.renameListClick.emit()) action = self.addAction('Delete') action.triggered.connect(lambda x: self.deleteListClick.emit()) self.setStyleSheet(''' QMenu { background-color: #2e2e2e; color: #cccccc; }; ''')
def __init__(self): """ Constructs a PortMenu Object. """ QMenu.__init__(self) # delete self.deleteAction = self.addAction("Delete") # rename self.renameAction = self.addAction("Rename") # configure ports self.configurePortsAction = self.addAction("Configure Ports")
def __init__(self): """ This class is the menu that shows when a component is right clicked in the TGUIM view. Constructing a ComponentMenu creates the menu items, but does not connect any actions. To connect the menu items to internal logic, use the methods that start with "on". For instance, the *onBlink* method connects the "Show in target GUI" menu item to the function passed in. Of course, that function should execute code to use the blinker appropriately. """ QMenu.__init__(self) self.blinkAction = self.addAction("Show in target GUI") blinkIcon = QIcon() blinkIcon.addPixmap( QPixmap(":/icon/resources/icons/office/spotlight.png"), QIcon.Normal, QIcon.Off) self.blinkAction.setIcon(blinkIcon)
def __init__(self, menu, parent=None): QMenu.__init__(self, menu.text, parent) self.__add_all(menu)
def __init__(self): QMenu.__init__(self, "") self.widgets = {}
def __init__(self): QMenu.__init__(self, "")