예제 #1
0
    def initActions(self):
        action = QAction("Choose as gripper", self)
        action.connect("triggered()", self.selectGripper)
        action.setShortcut(QKeySequence(QNamespace.Key_R))
        self.addAction(action)
        self.actionsList.append(action)
        self.mainWindow.registerShortcut(self.parentInstance.plugin.windowTitle, "Choose as gripper", action)

        action = QAction("Choose handle", self)
        action.connect("triggered()", self.selectHandle)
        action.setShortcut(QKeySequence(QNamespace.Key_H))
        self.addAction(action)
        self.actionsList.append(action)
        self.mainWindow.registerShortcut(self.parentInstance.plugin.windowTitle, "Choose as handle", action)

        action = QAction("Grasp from current", self.parentInstance)
        action.connect("triggered()", self.graspCurrent)
        action.setShortcut(QKeySequence(QNamespace.Key_G))
        self.mainWindow.registerShortcut(self.parentInstance.plugin.windowTitle, action)
        self.actionsList.append(action)

        action = QAction("Grasp from random", self.parentInstance)
        action.connect("triggered()", self.graspRandom)
        action.setShortcut(QKeySequence(QNamespace.ShiftModifier + QNamespace.Key_G))
        self.mainWindow.registerShortcut(self.parentInstance.plugin.windowTitle, action)
        self.actionsList.append(action)

        action = QAction("Pregrasp from current", self.parentInstance)
        action.connect("triggered()", self.pregraspCurrent)
        action.setShortcut(QKeySequence(QNamespace.Key_P))
        self.mainWindow.registerShortcut(self.parentInstance.plugin.windowTitle, action)
        self.actionsList.append(action)

        action = QAction("Pregrasp from random", self.parentInstance)
        action.connect("triggered()", self.pregraspRandom)
        action.setShortcut(QKeySequence(QNamespace.ShiftModifier + QNamespace.Key_P))
        self.mainWindow.registerShortcut(self.parentInstance.plugin.windowTitle, action)
        self.actionsList.append(action)

        action = QAction("Change handle used", self.parentInstance)
        action.connect("triggered()", self.changeHandle)
        action.setShortcut(QKeySequence(QNamespace.Key_F1))
        self.mainWindow.registerShortcut(self.parentInstance.plugin.windowTitle, action)
        self.actionsList.append(action)

        action = QAction("Change gripper used", self.parentInstance)
        action.connect("triggered()", self.changeGripper)
        action.setShortcut(QKeySequence(QNamespace.Key_F2))
        self.mainWindow.registerShortcut(self.parentInstance.plugin.windowTitle, action)
        self.actionsList.append(action)

        action = QAction("Lock current object", self.parentInstance)
        action.connect("triggered()", self.lock)
        action.setShortcut(QKeySequence(QNamespace.Key_L))
        self.mainWindow.registerShortcut(self.parentInstance.windowTitle, action)
        self.actionsList.append(action)
예제 #2
0
 def initActions(self):
     self.action = QAction("Switch mode", self)
     self.action.connect("triggered()", self.switchMode)
     self.action.setShortcut(
         QKeySequence(QNamespace.ControlModifier + QNamespace.Key_M))
     self.addAction(self.action)
     self.mainWindow.registerShortcut(self.plugin.windowTitle, self.action)
예제 #3
0
 def initActions(self):
     self.action = QAction("Start pick", self)
     self.action.setShortcut(QKeySequence(QNamespace.Key_P))
     self.action.connect("triggered()", self.startPlacement)
     self.parent().mainWindow.registerShortcut(
         self.parent().plugin.windowTitle, self.action)
     self.addAction(self.action)