from prymatex.core import PrymatexDock from prymatex.core.settings import ConfigurableItem from prymatex.utils.i18n import ugettext as _ from prymatex.utils import six from prymatex.widgets.pmxterm import Backend, BackendManager, TerminalWidget, ColorScheme SHEME_SCOPES = [ 'comment', 'string', 'constant.numeric', 'constantanguage', 'constant.character, constant.other', 'variable.language, variable.other', 'keyword', 'storage', 'entity.name.class', 'entity.other.inherited-class', 'entity.name.function', 'variable.parameter', 'entity.name.tag', 'entity.other.attribute-name', 'support.function', 'support.constant', 'support.type, support.class', 'support.other.variable', 'invalid' ] # Load color schemes ColorScheme.loadSchemes(os.path.join(config.PMX_SHARE_PATH, "TerminalSchemes")) class TabbedTerminal(QtWidgets.QTabWidget): def __init__(self, parent=None): super(TabbedTerminal, self).__init__(parent) self.setTabPosition(QtWidgets.QTabWidget.South) # Corner widget self.buttonNew = QtWidgets.QPushButton(self) self.buttonNew.setText("") self.buttonNew.setIcon(QtGui.QIcon.fromTheme("tab-new")) self.buttonNew.setMaximumSize(QtCore.QSize(28, 28)) self.buttonNew.clicked.connect(lambda checked: self.newTerminal()) self.setCornerWidget(self.buttonNew) self.setTabsClosable(True)