def __init__(self, highlight_caret_scope=False): Panel.__init__(self) self._native = True self._custom_indicators = ( ':/pyqode-icons/rc/arrow_right_off.png', ':/pyqode-icons/rc/arrow_right_on.png', ':/pyqode-icons/rc/arrow_down_off.png', ':/pyqode-icons/rc/arrow_down_on.png' ) self._custom_color = QtGui.QColor('gray') self._block_nbr = -1 self._highlight_caret = False self.highlight_caret_scope = highlight_caret_scope self._indic_size = 16 #: the list of deco used to highlight the current fold region ( #: surrounding regions are darker) self._scope_decos = [] #: the list of folded blocs decorations self._block_decos = [] self.setMouseTracking(True) self.scrollable = True self._mouse_over_line = None self._current_scope = None self._prev_cursor = None self.context_menu = None self.action_collapse = None self.action_expand = None self.action_collapse_all = None self.action_expand_all = None self._original_background = None self._highlight_runner = DelayJobRunner(delay=250)
def __init__(self, delay=1000): Mode.__init__(self) QtCore.QObject.__init__(self) self._jobRunner = DelayJobRunner(delay=delay) #: The list of results (elements might have children; this is actually #: a tree). self.results = []
def __init__(self, worker, delay=1000): Mode.__init__(self) QtCore.QObject.__init__(self) self._worker = worker self._jobRunner = DelayJobRunner(delay=delay) #: The list of definitions found in the file, each item is a #: pyqode.core.share.Definition. self._results = []
def __init__(self): QtCore.QObject.__init__(self) Mode.__init__(self) self._previous_cursor_start = -1 self._previous_cursor_end = -1 self._deco = None self._cursor = None self._timer = DelayJobRunner(delay=200)
def __init__(self): super(OccurrencesHighlighterMode, self).__init__() self._decorations = [] #: Timer used to run the search request with a specific delay self.timer = DelayJobRunner(delay=1000) self._sub = None self._background = QtGui.QColor('#80CC80') self._foreground = QtGui.QColor('#404040') self._underlined = True
def __init__(self): super(GoToAssignmentsMode, self).__init__() self._definitions = [] self._goto_requested = False self.action_goto = QtWidgets.QAction("Go to assignments", self) self.action_goto.setShortcut(self.shortcut) self.action_goto.triggered.connect(self.request_goto) self.word_clicked.connect(self._on_word_clicked) self._runner = DelayJobRunner(delay=1)
def __init__(self): super(GoToAssignmentsMode, self).__init__() self._definitions = [] self._goto_requested = False self.action_goto = QtWidgets.QAction(_("Go to assignments"), self) self.action_goto.setShortcut(self.shortcut) self.action_goto.triggered.connect(self.request_goto) icon = icons.icon(qta_name='fa.share') if icon: self.action_goto.setIcon(icon) self.word_clicked.connect(self._on_word_clicked) self._runner = DelayJobRunner(delay=1)
def __init__(self): QObject.__init__(self) Mode.__init__(self) self._previous_cursor_start = -1 self._previous_cursor_end = -1 self._definition = None self._deco = None self._pending = False self.action_goto = QAction(_("Go to assignments"), self) self.action_goto.setShortcut('F7') self.action_goto.triggered.connect(self.request_goto) self.word_clicked.connect(self.request_goto) self._timer = DelayJobRunner(delay=200)
def __init__(self): super(CheckerPanel, self).__init__() self._previous_line = -1 self.scrollable = True self._job_runner = DelayJobRunner(delay=100) self.setMouseTracking(True) #: Info icon self.info_icon = QtGui.QIcon.fromTheme( 'dialog-info', QtGui.QIcon(':pyqode-icons/rc/dialog-info.png')) #: Warning icon self.warning_icon = QtGui.QIcon.fromTheme( 'dialog-warning', QtGui.QIcon(':pyqode-icons/rc/dialog-warning.png')) #: Error icon self.error_icon = QtGui.QIcon.fromTheme( 'dialog-error', QtGui.QIcon(':pyqode-icons/rc/dialog-error.png'))
def __init__(self): super(CheckerPanel, self).__init__() self._previous_line = -1 self.scrollable = True self._job_runner = DelayJobRunner(delay=100) self.setMouseTracking(True) #: Info icon self.info_icon = icons.icon( 'dialog-info', ':pyqode-icons/rc/dialog-info.png', 'fa.info-circle', qta_options={'color': '#4040DD'}) self.warning_icon = icons.icon( 'dialog-warning', ':pyqode-icons/rc/dialog-warning.png', 'fa.exclamation-triangle', qta_options={'color': '#DDDD40'}) self.error_icon = icons.icon( 'dialog-error', ':pyqode-icons/rc/dialog-error.png', 'fa.exclamation-circle', qta_options={'color': '#DD4040'})
def __init__(self, window=None): super().__init__() self._query_thread = None self.icon_provider = widgets.FileIconProvider() self._runner = DelayJobRunner(delay=300) self.main_window = window self.ui = locator_ui.Ui_Frame() self.ui.setupUi(self) self.ui.lineEdit.textChanged.connect(self.request_search) self.ui.lineEdit.prompt_text = _('Type to locate...') self.ui.lineEdit.installEventFilter(self) self.ui.treeWidget.installEventFilter(self) self.ui.treeWidget.setItemDelegate(HTMLDelegate()) self.setWindowFlags(QtCore.Qt.Popup) self.ui.lineEdit.setFocus(True) self.ui.bt_close.clicked.connect(self.hide) self.ui.bt_infos.clicked.connect(self._show_help) self.mode = self.MODE_GOTO_FILE self.ui.treeWidget.currentItemChanged.connect( self._on_current_item_changed) self.ui.treeWidget.itemDoubleClicked.connect(self._activate) self.ui.cb_non_project_files.toggled.connect(self._search)
def __init__(self, window): super().__init__() self.main_window = window self.parser_plugins = [] self._indexors = [] self._locator = LocatorWidget(self.main_window) self._locator.activated.connect(self._on_locator_activated) self._locator.cancelled.connect(self._on_locator_cancelled) self._widget = QtWidgets.QWidget(self.main_window) self._job_runner = DelayJobRunner() self._cached_files = [] self._running_tasks = False self._widget.installEventFilter(self) self._setup_filesystem_treeview() self._setup_prj_selector_widget(self.main_window) self._setup_dock_widget() self._setup_tab_bar_context_menu(self.main_window) self._setup_locator() self._setup_project_menu() self._load_parser_plugins() api.signals.connect_slot(api.signals.CURRENT_EDITOR_CHANGED, self._on_current_editor_changed)
def __init__(self, parent=None): super(HtmlPreviewWidget, self).__init__(parent) self._editor = None self._timer = DelayJobRunner(delay=1000)
def __init__(self, parent): QtWidgets.QTabBar.__init__(self, parent) self.setTabsClosable(True) self._timer = DelayJobRunner(delay=1)