def _enabled_item_menu(self): return [ MenuActionTypes.OpenFile(), MenuActionTypes.Edit(), MenuActionTypes.Trace(), None, MenuActionTypes.Delete() ]
def _get_menu_items(self): return [ MenuActionTypes.Edit(), MenuActionTypes.View(), MenuActionTypes.Delete(), None, MenuActionTypes.AddTestprogram() ]
def _enabled_item_menu(self): return [ MenuActionTypes.Edit(), MenuActionTypes.View(), MenuActionTypes.Trace(), None, self._dependant_menu_type() ]
def _get_menu_items(self): return [ MenuActionTypes.Edit(), MenuActionTypes.View(), MenuActionTypes.MoveUp(), MenuActionTypes.MoveDown(), None, MenuActionTypes.Delete() ]
def _enabled_item_menu(self): menu = [MenuActionTypes.OpenFile()] if self._is_default: menu.append(MenuActionTypes.UseCustomImplementation()) else: menu.append(MenuActionTypes.UseDefaultImplementation()) return menu
def _enabled_item_menu(self): menu = [MenuActionTypes.OpenFile(), MenuActionTypes.Edit(), MenuActionTypes.Trace()] delete_menu_option = [None, MenuActionTypes.Delete()] if not self.dependency_list: menu += delete_menu_option return menu
def _generate_new_menu_actions(self, parent): new_menu = QtWidgets.QMenu('New', parent) import qtawesome as qta new_menu.setIcon(qta.icon('mdi.plus', color='orange')) new_file = QtWidgets.QAction(ACTIONS[MenuActionTypes.AddFile()][1], new_menu) new_file.setIcon(ACTIONS[MenuActionTypes.AddFile()][0]) new_file.triggered.connect(self.add_file__item) new_folder = QtWidgets.QAction(ACTIONS[MenuActionTypes.AddFolder()][1], new_menu) new_folder.setIcon(ACTIONS[MenuActionTypes.AddFolder()][0]) new_folder.triggered.connect(self.add_folder_item) new_menu.addAction(new_file) new_menu.addAction(new_folder) return new_menu
def _generate_import_menu_actions(self, parent): menu_action = QtWidgets.QMenu('Import', parent) import qtawesome as qta menu_action.setIcon(qta.icon('mdi.application-import', color='orange')) import_file = QtWidgets.QAction(ACTIONS[MenuActionTypes.AddFile()][1], parent) import_file.setIcon(ACTIONS[MenuActionTypes.ImportFile()][0]) import_file.triggered.connect(self.import_file_item) import_folder = QtWidgets.QAction(ACTIONS[MenuActionTypes.AddFolder()][1], parent) import_folder.setIcon(ACTIONS[MenuActionTypes.ImportFolder()][0]) import_folder.triggered.connect(self.import_folder_item) menu_action.addAction(import_file) menu_action.addAction(import_folder) return menu_action
def _get_menu_items(self): menu = [ MenuActionTypes.Edit(), MenuActionTypes.View(), MenuActionTypes.CopyPath(), None, MenuActionTypes.Delete() ] if not self.is_single: menu.insert(2, MenuActionTypes.MoveDown()) menu.insert(2, MenuActionTypes.MoveUp()) return menu
def is_valid_functionality(functionality): return functionality not in (MenuActionTypes.Add(), MenuActionTypes.CloneFrom())
def _get_menu_items(): return [MenuActionTypes.Add(), MenuActionTypes.CloneFrom()]
def _get_menu_items(self): return [MenuActionTypes.Add()]
def is_valid_functionality(self, functionality): if functionality in (MenuActionTypes.AddStandardTest(), MenuActionTypes.Import()): return False return True
def _get_menu_items(): return [MenuActionTypes.Add(), MenuActionTypes.AddStandardTest(), MenuActionTypes.Import()]
def _disabled_item_menu(self): return [MenuActionTypes.Select()]
def _enabled_item_menu(self): menu = super()._enabled_item_menu() menu.insert(0, MenuActionTypes.Activate()) return menu
def is_valid_functionality(functionality): return not functionality == MenuActionTypes.CloneFrom()
def _disabled_item_menu(self): return [MenuActionTypes.Enable()]
import qtawesome as qta from ATE.spyder.widgets.actions_on.model.Constants import MenuActionTypes ACTIONS = { MenuActionTypes.Edit(): (qta.icon('mdi.lead-pencil', color='orange'), "Edit"), MenuActionTypes.Add(): (qta.icon('mdi.plus', color='orange'), "New"), MenuActionTypes.AddFile(): (qta.icon('mdi.file-plus', color='orange'), "File"), MenuActionTypes.AddFolder(): (qta.icon('mdi.folder-plus', color='orange'), "Folder"), MenuActionTypes.View(): (qta.icon('mdi.eye-outline', color='orange'), "View"), MenuActionTypes.Delete(): (qta.icon('mdi.minus', color='orange'), "Delete"), MenuActionTypes.Import(): (qta.icon('mdi.application-import', color='orange'), "Import"), MenuActionTypes.ImportFile(): (qta.icon('mdi.file-import', color='orange'), "File"), MenuActionTypes.ImportFolder(): (qta.icon('mdi.folder-download', color='orange'), "Folder"), MenuActionTypes.Activate(): (qta.icon('mdi.check', color='orange'), "Select Hardware"), MenuActionTypes.CloneTo(): (qta.icon('mdi.application-export', color='orange'), "Clone to ..."), MenuActionTypes.CloneFrom(): (qta.icon('mdi.application-import', color='orange'), "Clone from ..."), MenuActionTypes.Trace(): (qta.icon('mdi.share-variant', color='orange'), "Trace usage"), MenuActionTypes.AddStandardTest():
import qtawesome as qta from ATE.spyder.widgets.actions_on.model.Constants import MenuActionTypes ACTIONS = {MenuActionTypes.Edit(): (qta.icon('mdi.lead-pencil', color='orange'), "Edit"), MenuActionTypes.Add(): (qta.icon('mdi.plus', color='orange'), "New"), MenuActionTypes.AddFile(): (qta.icon('mdi.file-plus', color='orange'), "File"), MenuActionTypes.AddFolder(): (qta.icon('mdi.folder-plus', color='orange'), "Folder"), MenuActionTypes.View(): (qta.icon('mdi.eye-outline', color='orange'), "View"), MenuActionTypes.Delete(): (qta.icon('mdi.minus', color='orange'), "Delete"), MenuActionTypes.Import(): (qta.icon('mdi.application-import', color='orange'), "Import"), MenuActionTypes.ImportFile(): (qta.icon('mdi.file-import', color='orange'), "File"), MenuActionTypes.ImportFolder(): (qta.icon('mdi.folder-download', color='orange'), "Folder"), MenuActionTypes.Activate(): (qta.icon('mdi.check', color='orange'), "Select Hardware"), MenuActionTypes.CloneTo(): (qta.icon('mdi.application-export', color='orange'), "Clone to ..."), MenuActionTypes.CloneFrom(): (qta.icon('mdi.application-import', color='orange'), "Clone from ..."), MenuActionTypes.Trace(): (qta.icon('mdi.share-variant', color='orange'), "Trace usage"), MenuActionTypes.AddStandardTest(): (qta.icon('mdi.plus-box-outline', color='orange'), "Add Standard Test"), MenuActionTypes.Rename(): (qta.icon('mdi.file-edit', color='orange'), "Rename"), MenuActionTypes.Move(): (qta.icon('mdi.file-move', color='orange'), "Move"), MenuActionTypes.DeleteFile(): (qta.icon('mdi.file-remove', color='orange'), "Remove"), MenuActionTypes.Obsolete(): (qta.icon('mdi.block-helper', color='orange'), "Obsolete"), MenuActionTypes.Enable(): (qta.icon('mdi.check', color='orange'), "Activate"), MenuActionTypes.MoveUp(): (qta.icon('mdi.arrow-up-bold-box', color='orange'), "Move Up"), MenuActionTypes.MoveDown(): (qta.icon('mdi.arrow-down-bold-box', color='orange'), "Move Down"), MenuActionTypes.OpenFile(): (qta.icon('mdi.book-open', color='orange'), "Open"), MenuActionTypes.AddTestprogram(): (qta.icon('mdi.plus', color='orange'), "New Testprogram"), MenuActionTypes.UseCustomImplementation(): (qta.icon('mdi.file-move', color='orange'), "Use Custom Implementation"), MenuActionTypes.UseDefaultImplementation(): (qta.icon('mdi.file-replace', color='orange'), "Use Default Implementation"), MenuActionTypes.Select(): (qta.icon('mdi.check', color='orange'), "Select Target")}
def _get_menu_items(): return [MenuActionTypes.DeleteFile()]
def _get_menu_items(): return [MenuActionTypes.ImportFile(), MenuActionTypes.CloneFrom()]
def _dependant_menu_type(self): if not len(self.dependency_list): return MenuActionTypes.Delete() else: return MenuActionTypes.Obsolete()
def _get_menu_items(self): return [MenuActionTypes.AddTestprogram()]
def _get_menu_items(self): return [MenuActionTypes.Rename(), MenuActionTypes.Move(), None, MenuActionTypes.DeleteFile()]
def _get_menu_items(): return [MenuActionTypes.ImportFile()]