def setup_menu(self):
        """
        Setup the menu that is generated on right clicking in the action tree.
        """
        self.right_click_menu_files = QtWidgets.QMenu('menu', self)

        exclude_dat = QtWidgets.QAction('Exclude File', self)
        exclude_dat.triggered.connect(self.exclude_file_event)
        undo_exclude_dat = QtWidgets.QAction('Undo Exclude', self)
        undo_exclude_dat.triggered.connect(self.undo_exclude)

        self.right_click_menu_files.addAction(exclude_dat)
        self.right_click_menu_files.addAction(undo_exclude_dat)
Ejemplo n.º 2
0
    def setup_menu(self):
        """
        Build the right click menu for added lines
        """

        self.right_click_menu = QtWidgets.QMenu('menu', self)

        close_dat = QtWidgets.QAction('Close', self)
        close_dat.triggered.connect(self.right_click_close_row)
        show_explorer = QtWidgets.QAction('Open Explorer', self)
        show_explorer.triggered.connect(self.show_file_in_explorer)

        self.right_click_menu.addAction(close_dat)
        self.right_click_menu.addAction(show_explorer)
Ejemplo n.º 3
0
 def contextMenuEvent(self, event):
     mymenu = QtWidgets.QMenu(self)
     copy_action = QtWidgets.QAction('Copy', self)
     copy_action.triggered.connect(self.copy_data)
     mymenu.addAction(copy_action)
     mymenu.popup(QtGui.QCursor.pos())
     self._tablewithcopy_pos = event.pos()
 def contextMenuEvent(self, e: QtGui.QContextMenuEvent) -> None:
     # add a clear action
     menu = self.createStandardContextMenu(e.pos())
     newaction = QtWidgets.QAction('Clear', self)
     newaction.triggered.connect(self._clr_window)
     menu.addAction(newaction)
     menu.exec(e.globalPos())
Ejemplo n.º 5
0
    def setup_menu(self):
        """
        Setup the menu that is generated on right clicking in the project tree.
        """
        self.right_click_menu_converted = QtWidgets.QMenu('menu', self)
        self.right_click_menu_surfaces = QtWidgets.QMenu('menu', self)

        close_dat = QtWidgets.QAction('Close', self)
        close_dat.triggered.connect(self.close_item_event)
        load_in_console = QtWidgets.QAction('Load in console', self)
        load_in_console.triggered.connect(self.load_in_console_event)
        zoom_extents = QtWidgets.QAction('Zoom Extents', self)
        zoom_extents.triggered.connect(self.zoom_extents_event)

        self.right_click_menu_converted.addAction(close_dat)
        self.right_click_menu_converted.addAction(load_in_console)
        self.right_click_menu_converted.addAction(zoom_extents)

        self.right_click_menu_surfaces.addAction(close_dat)
        self.right_click_menu_surfaces.addAction(load_in_console)
        self.right_click_menu_surfaces.addAction(zoom_extents)
Ejemplo n.º 6
0
    def setup_menu(self):
        """
        Setup the menu that is generated on right clicking in the project tree.
        """
        self.right_click_menu_converted = QtWidgets.QMenu('menu', self)
        self.right_click_menu_surfaces = QtWidgets.QMenu('menu', self)

        close_dat = QtWidgets.QAction('Close', self)
        close_dat.triggered.connect(self.close_item_event)
        reprocess = QtWidgets.QAction('Reprocess', self)
        reprocess.triggered.connect(self.reprocess_event)
        load_in_console = QtWidgets.QAction('Load in Console', self)
        load_in_console.triggered.connect(self.load_in_console_event)
        show_explorer_action = QtWidgets.QAction('Show in Explorer', self)
        show_explorer_action.triggered.connect(self.show_in_explorer_event)
        zoom_extents = QtWidgets.QAction('Zoom Extents', self)
        zoom_extents.triggered.connect(self.zoom_extents_event)
        update_surface = QtWidgets.QAction('Update Surface', self)
        update_surface.triggered.connect(self.update_surface_event)
        manage_fqpr = QtWidgets.QAction('Manage', self)
        manage_fqpr.triggered.connect(self.manage_data_event)

        self.right_click_menu_converted.addAction(manage_fqpr)
        self.right_click_menu_converted.addAction(load_in_console)
        self.right_click_menu_converted.addAction(show_explorer_action)
        self.right_click_menu_converted.addAction(zoom_extents)
        self.right_click_menu_converted.addSeparator()
        self.right_click_menu_converted.addAction(reprocess)
        self.right_click_menu_converted.addAction(close_dat)

        self.right_click_menu_surfaces.addAction(manage_fqpr)
        self.right_click_menu_surfaces.addAction(load_in_console)
        self.right_click_menu_surfaces.addAction(show_explorer_action)
        self.right_click_menu_surfaces.addAction(zoom_extents)
        self.right_click_menu_surfaces.addSeparator()
        self.right_click_menu_surfaces.addAction(update_surface)
        self.right_click_menu_surfaces.addAction(close_dat)