Beispiel #1
0
    def _initShortcuts(self):
        mgr = ShortcutManager()
        shortcutGroupName = "Predictions"

        togglePredictions = QShortcut(
            QKeySequence("p"),
            self,
            member=self.labelingDrawerUi.checkShowPredictions.click)
        mgr.register(shortcutGroupName, "Toggle Prediction Layer Visibility",
                     togglePredictions,
                     self.labelingDrawerUi.checkShowPredictions)

        toggleSegmentation = QShortcut(
            QKeySequence("s"),
            self,
            member=self.labelingDrawerUi.checkShowSegmentation.click)
        mgr.register(shortcutGroupName, "Toggle Segmentaton Layer Visibility",
                     toggleSegmentation,
                     self.labelingDrawerUi.checkShowSegmentation)

        toggleLivePredict = QShortcut(
            QKeySequence("l"),
            self,
            member=self.labelingDrawerUi.checkInteractive.click)
        mgr.register(shortcutGroupName, "Toggle Live Prediction Mode",
                     toggleLivePredict, self.labelingDrawerUi.checkInteractive)
Beispiel #2
0
    def __initShortcuts(self):
        mgr = ShortcutManager()
        shortcutGroupName = "Labeling"

        addLabel = QShortcut(QKeySequence("a"),
                             self,
                             member=self.labelingDrawerUi.AddLabelButton.click)
        mgr.register(shortcutGroupName, "Add New Label Class", addLabel,
                     self.labelingDrawerUi.AddLabelButton)

        navMode = QShortcut(QKeySequence("n"),
                            self,
                            member=self.labelingDrawerUi.arrowToolButton.click)
        mgr.register(shortcutGroupName, "Navigation Cursor", navMode,
                     self.labelingDrawerUi.arrowToolButton)

        brushMode = QShortcut(
            QKeySequence("b"),
            self,
            member=self.labelingDrawerUi.paintToolButton.click)
        mgr.register(shortcutGroupName, "Brush Cursor", brushMode,
                     self.labelingDrawerUi.paintToolButton)

        eraserMode = QShortcut(
            QKeySequence("e"),
            self,
            member=self.labelingDrawerUi.eraserToolButton.click)
        mgr.register(shortcutGroupName, "Eraser Cursor", eraserMode,
                     self.labelingDrawerUi.eraserToolButton)

        changeBrushSize = QShortcut(
            QKeySequence("c"),
            self,
            member=self.labelingDrawerUi.brushSizeComboBox.showPopup)
        mgr.register(shortcutGroupName, "Change Brush Size", changeBrushSize,
                     self.labelingDrawerUi.brushSizeComboBox)

        self._labelShortcuts = []
    def __initShortcuts(self):
        mgr = ShortcutManager()
        shortcutGroupName = "Labeling"

        addLabel = QShortcut( QKeySequence("a"), self, member=self.labelingDrawerUi.AddLabelButton.click )
        mgr.register( shortcutGroupName,
                      "Add New Label Class",
                      addLabel,
                      self.labelingDrawerUi.AddLabelButton )

        navMode = QShortcut( QKeySequence("n"), self, member=self.labelingDrawerUi.arrowToolButton.click )
        mgr.register( shortcutGroupName,
                      "Navigation Cursor",
                      navMode,
                      self.labelingDrawerUi.arrowToolButton )

        brushMode = QShortcut( QKeySequence("b"), self, member=self.labelingDrawerUi.paintToolButton.click )
        mgr.register( shortcutGroupName,
                      "Brush Cursor",
                      brushMode,
                      self.labelingDrawerUi.paintToolButton )

        eraserMode = QShortcut( QKeySequence("e"), self, member=self.labelingDrawerUi.eraserToolButton.click )
        mgr.register( shortcutGroupName,
                      "Eraser Cursor",
                      eraserMode,
                      self.labelingDrawerUi.eraserToolButton )

        changeBrushSize = QShortcut( QKeySequence("c"), self, member=self.labelingDrawerUi.brushSizeComboBox.showPopup )
        mgr.register( shortcutGroupName,
                      "Change Brush Size",
                      changeBrushSize,
                      self.labelingDrawerUi.brushSizeComboBox )


        self._labelShortcuts = []
    def _initShortcuts(self):
        mgr = ShortcutManager()
        shortcutGroupName = "Predictions"

        togglePredictions = QShortcut( QKeySequence("p"), self, member=self.labelingDrawerUi.checkShowPredictions.click )
        mgr.register( shortcutGroupName,
                      "Toggle Prediction Layer Visibility",
                      togglePredictions,
                      self.labelingDrawerUi.checkShowPredictions )        

        toggleSegmentation = QShortcut( QKeySequence("s"), self, member=self.labelingDrawerUi.checkShowSegmentation.click )
        mgr.register( shortcutGroupName,
                      "Toggle Segmentaton Layer Visibility",
                      toggleSegmentation,
                      self.labelingDrawerUi.checkShowSegmentation )        

        toggleLivePredict = QShortcut( QKeySequence("l"), self, member=self.labelingDrawerUi.checkInteractive.click )
        mgr.register( shortcutGroupName,
                      "Toggle Live Prediction Mode",
                      toggleLivePredict,
                      self.labelingDrawerUi.checkInteractive )