コード例 #1
0
	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")
コード例 #2
0
	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")
コード例 #3
0
ファイル: sidebar.py プロジェクト: max-k/Liszt
    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;
            };
        ''')
コード例 #4
0
    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")
コード例 #5
0
    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)
コード例 #6
0
ファイル: indicator.py プロジェクト: defseg/vaalbara
 def __init__(self, menu, parent=None):
     QMenu.__init__(self, menu.text, parent)
     self.__add_all(menu)
コード例 #7
0
ファイル: indicator.py プロジェクト: defseg/vaalbara
 def __init__(self):
     QMenu.__init__(self, "")
     self.widgets = {}
コード例 #8
0
ファイル: indicator.py プロジェクト: defseg/vaalbara-lite
 def __init__(self):
     QMenu.__init__(self, "")