Example #1
0
 def __init__(self, parent):
     QTabBar.__init__(self, parent)
     self.setDocumentMode(True)
     self.setDrawBase(False)
     self.setMovable(True)
     self.setTabsClosable(gprefs['vl_tabs_closable'])
     self.gui = parent
     self.ignore_tab_changed = False
     self.currentChanged.connect(self.tab_changed)
     self.tabMoved.connect(self.tab_moved,
                           type=Qt.ConnectionType.QueuedConnection)
     self.tabCloseRequested.connect(self.tab_close)
     self.setVisible(gprefs['show_vl_tabs'])
     self.next_action = a = QAction(self)
     a.triggered.connect(partial(self.next_tab,
                                 delta=1)), self.gui.addAction(a)
     self.previous_action = a = QAction(self)
     a.triggered.connect(partial(self.next_tab,
                                 delta=-1)), self.gui.addAction(a)
     self.gui.keyboard.register_shortcut(
         'virtual-library-tab-bar-next',
         _('Next Virtual library'),
         action=self.next_action,
         default_keys=('Ctrl+Right', ),
         description=
         _('Switch to the next Virtual library in the Virtual library tab bar'
           ))
     self.gui.keyboard.register_shortcut(
         'virtual-library-tab-bar-previous',
         _('Previous Virtual library'),
         action=self.previous_action,
         default_keys=('Ctrl+Left', ),
         description=
         _('Switch to the previous Virtual library in the Virtual library tab bar'
           ))
Example #2
0
 def __init__(self, parent):
     QTabBar.__init__(self, parent)
     self.setDocumentMode(True)
     self.setDrawBase(False)
     self.setMovable(True)
     self.setTabsClosable(True)
     self.gui = parent
     self.ignore_tab_changed = False
     self.currentChanged.connect(self.tab_changed)
     self.tabMoved.connect(self.tab_moved, type=Qt.QueuedConnection)
     self.tabCloseRequested.connect(self.tab_close)
     self.setStyleSheet('QTabBar::tab:selected { font-weight: bold } QTabBar::tab { text-align: center }')
     self.setVisible(gprefs['show_vl_tabs'])
     self.next_action = a = QAction(self)
     a.triggered.connect(partial(self.next_tab, delta=1)), self.gui.addAction(a)
     self.previous_action = a = QAction(self)
     a.triggered.connect(partial(self.next_tab, delta=-1)), self.gui.addAction(a)
     self.gui.keyboard.register_shortcut(
         'virtual-library-tab-bar-next', _('Next virtual library'), action=self.next_action,
         default_keys=('Ctrl+Right',),
         description=_('Switch to the next Virtual Library in the Virtual Library tab bar')
     )
     self.gui.keyboard.register_shortcut(
         'virtual-library-tab-bar-previous', _('Previous virtual library'), action=self.previous_action,
         default_keys=('Ctrl+Left',),
         description=_('Switch to the previous Virtual Library in the Virtual Library tab bar')
     )
Example #3
0
 def __init__(self, parent):
     QTabBar.__init__(self, parent)
     self.setDocumentMode(True)
     self.setDrawBase(False)
     self.setMovable(True)
     self.setTabsClosable(True)
     self.gui = parent
     self.currentChanged.connect(self.tab_changed)
     self.tabMoved.connect(self.tab_moved, type=Qt.QueuedConnection)
     self.tabCloseRequested.connect(self.tab_close)
     self.setStyleSheet('QTabBar::tab:selected { font-weight: bold } QTabBar::tab { text-align: center }')
     self.setVisible(gprefs['show_vl_tabs'])
Example #4
0
 def __init__(self, parent):
     QTabBar.__init__(self, parent)
     self.setDocumentMode(True)
     self.setDrawBase(False)
     self.setMovable(True)
     self.setTabsClosable(True)
     self.gui = parent
     self.currentChanged.connect(self.tab_changed)
     self.tabMoved.connect(self.tab_moved, type=Qt.QueuedConnection)
     self.tabCloseRequested.connect(self.tab_close)
     self.setStyleSheet(
         'QTabBar::tab:selected { font-weight: bold } QTabBar::tab { text-align: center }'
     )
     self.setVisible(gprefs['show_vl_tabs'])