Exemplo n.º 1
0
 def context_menu(self):
     try:
         menu = super(PyDMRelatedDisplayButton, self).context_menu()
     except:
         menu = QMenu(self)
     if len(menu.findChildren(QAction)) > 0:
         menu.addSeparator()
     menu.addAction(self.open_in_new_window_action)
     return menu
Exemplo n.º 2
0
 def context_menu(self):
     try:
         menu = super(PyDMRelatedDisplayButton, self).context_menu()
     except:
         menu = QMenu(self)
     if len(menu.findChildren(QAction)) > 0:
         menu.addSeparator()
     menu.addAction(self.open_in_new_window_action)
     return menu
Exemplo n.º 3
0
 def context_menu(self):
     try:
         menu = super(PyDMRelatedDisplayButton, self).context_menu()
     except:
         menu = QMenu(self)
     if len(menu.findChildren(QAction)) > 0:
         menu.addSeparator()
     if len(self.filenames) <= 1:
         menu.addAction(self.open_in_new_window_action)
         return menu
     sub_menu = menu.addMenu("Open in New Window")
     self._assemble_menu(sub_menu, target=self.NEW_WINDOW)
     return menu