• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python mode.Mode类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中pyqode.core.api.mode.Mode的典型用法代码示例。如果您正苦于以下问题:Python Mode类的具体用法?Python Mode怎么用?Python Mode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Mode类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: __init__

 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)
开发者ID:OpenCobolIDE,项目名称:OpenCobolIDE,代码行数:8,代码来源:wordclick.py


示例2: on_install

 def on_install(self, editor):
     self._completer = QtWidgets.QCompleter([""], editor)
     self._completer.setCompletionMode(self._completer.PopupCompletion)
     self._completer.activated.connect(self._insert_completion)
     self._completer.highlighted.connect(
         self._on_selected_completion_changed)
     self._completer.setModel(QtGui.QStandardItemModel())
     self._helper = TextHelper(editor)
     Mode.on_install(self, editor)
开发者ID:AlexLee,项目名称:cadquery-freecad-module,代码行数:9,代码来源:code_completion.py


示例3: __init__

 def __init__(self):
     QtCore.QObject.__init__(self)
     Mode.__init__(self)
     self._auto_reload = False
     self._flg_notify = False
     self._data = (None, None)
     self._timer = QtCore.QTimer()
     self._timer.setInterval(1000)
     self._timer.timeout.connect(self._check_mtime)
     self._mtime = 0
     self._notification_pending = False
     self._processing = False
开发者ID:AlexLee,项目名称:cadquery-freecad-module,代码行数:12,代码来源:filewatcher.py


示例4: __init__

 def __init__(self):
     Mode.__init__(self)
     QtWidgets.QWidget.__init__(self)
     #: Panel order into the zone it is installed to. This value is
     #: automatically set when installing the panel but it can be changed
     #: later (negative values can also be used).
     self.order_in_zone = -1
     self._scrollable = False
     self._background_brush = None
     self._foreground_pen = None
     #: Position in the editor (top, left, right, bottom)
     self.position = -1
开发者ID:AlexLee,项目名称:cadquery-freecad-module,代码行数:12,代码来源:panel.py


示例5: __init__

 def __init__(self):
     Mode.__init__(self)
     QtCore.QObject.__init__(self)
     self._current_completion = ""
     self._trigger_key = QtCore.Qt.Key_Space
     self._trigger_len = 1
     self._trigger_symbols = ['.']
     self._case_sensitive = False
     self._completer = None
     self._filter_mode = self.FILTER_FUZZY
     self._last_cursor_line = -1
     self._last_cursor_column = -1
     self._tooltips = {}
     self._show_tooltips = False
     self._request_id = self._last_request_id = 0
开发者ID:OpenCobolIDE,项目名称:OpenCobolIDE,代码行数:15,代码来源:code_completion.py


示例6: __init__

 def __init__(self, parent, color_scheme=None):
     """
     :param parent: parent document (QTextDocument)
     :param color_scheme: color scheme to use.
     """
     QtGui.QSyntaxHighlighter.__init__(self, parent)
     Mode.__init__(self)
     if not color_scheme:
         color_scheme = ColorScheme('qt')
     self._color_scheme = color_scheme
     self._spaces_ptrn = QtCore.QRegExp(r'[ \t]+')
     #: Fold detector. Set it to a valid FoldDetector to get code folding
     #: to work. Default is None
     self.fold_detector = None
     self.WHITESPACES = QtCore.QRegExp(r'\s+')
开发者ID:AlexLee,项目名称:cadquery-freecad-module,代码行数:15,代码来源:syntax_highlighter.py


示例7: __init__

 def __init__(self, dynamic=False):
     Mode.__init__(self)
     QtWidgets.QWidget.__init__(self)
     #: Specifies whether the panel is dynamic. A dynamic panel is a panel
     #: that will be shown/hidden depending on the context.
     #: Dynamic panel should not appear in any GUI menu (e.g. no display
     #: in the panels menu of the notepad example).
     self.dynamic = dynamic
     #: Panel order into the zone it is installed to. This value is
     #: automatically set when installing the panel but it can be changed
     #: later (negative values can also be used).
     self.order_in_zone = -1
     self._scrollable = False
     self._background_brush = None
     self._foreground_pen = None
     #: Position in the editor (top, left, right, bottom)
     self.position = -1
开发者ID:OpenCobolIDE,项目名称:OpenCobolIDE,代码行数:17,代码来源:panel.py


示例8: on_install

    def on_install(self, editor):
        """
        Extends :meth:`pyqode.core.api.Mode.on_install` method to set the
        editor instance as the parent widget.

        .. warning:: Don't forget to call **super** if you override this
            method!

        :param editor: editor instance
        :type editor: pyqode.core.api.CodeEdit
        """
        Mode.on_install(self, editor)
        self.setParent(editor)
        self.setPalette(QtWidgets.QApplication.instance().palette())
        self.setFont(QtWidgets.QApplication.instance().font())
        self.editor.panels.refresh()
        self._background_brush = QtGui.QBrush(QtGui.QColor(
            self.palette().window().color()))
        self._foreground_pen = QtGui.QPen(QtGui.QColor(
            self.palette().windowText().color()))
开发者ID:AlexLee,项目名称:cadquery-freecad-module,代码行数:20,代码来源:panel.py


示例9: __init__

 def __init__(self, worker,
              delay=500,
              show_tooltip=True):
     """
     :param worker: The process function or class to call remotely.
     :param delay: The delay used before running the analysis process when
                   trigger is set to
                   :class:pyqode.core.modes.CheckerTriggers`
     :param show_tooltip: Specify if a tooltip must be displayed when the
                          mouse is over a checker message decoration.
     """
     Mode.__init__(self)
     QtCore.QObject.__init__(self)
     # max number of messages to keep good performances
     self.limit = 200
     self._job_runner = DelayJobRunner(delay=delay)
     self._messages = []
     self._worker = worker
     self._mutex = QtCore.QMutex()
     self._show_tooltip = show_tooltip
     self._pending_msg = []
     self._finished = True
开发者ID:dtonal,项目名称:pyqode.core,代码行数:22,代码来源:checker.py


示例10: __init__

 def __init__(self):
     Mode.__init__(self)
     QtCore.QObject.__init__(self)
     self._current_completion = ""
     # use to display a waiting cursor if completion provider takes too much
     # time
     self._job_runner = DelayJobRunner(delay=1000)
     self._tooltips = {}
     self._cursor_line = -1
     self._cancel_next = False
     self._request_cnt = 0
     self._last_completion_prefix = ""
     self._trigger_key = None
     self._trigger_len = None
     self._trigger_symbols = None
     self._show_tooltips = None
     self._case_sensitive = None
     self._data = None
     self._completer = None
     self._col = 0
     self._skip_next_backspace_released = False
     self._init_settings()
开发者ID:AlexLee,项目名称:cadquery-freecad-module,代码行数:22,代码来源:code_completion.py


示例11: on_uninstall

 def on_uninstall(self):
     Mode.on_uninstall(self)
     self._completer.popup().hide()
     self._completer = None
开发者ID:OpenCobolIDE,项目名称:OpenCobolIDE,代码行数:4,代码来源:code_completion.py


示例12: on_install

 def on_install(self, editor):
     self._create_completer()
     self._completer.setModel(QtGui.QStandardItemModel())
     self._helper = TextHelper(editor)
     Mode.on_install(self, editor)
开发者ID:OpenCobolIDE,项目名称:OpenCobolIDE,代码行数:5,代码来源:code_completion.py


示例13: __init__

 def __init__(self):
     Mode.__init__(self)
     self._actions_created = False
     self.action_to_lower = None
     self.action_to_upper = None
开发者ID:abdullahtahiriyo,项目名称:cadquery-freecad-module,代码行数:5,代码来源:case_converter.py



注:本文中的pyqode.core.api.mode.Mode类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python utils.DelayJobRunner类代码示例发布时间:2022-05-27
下一篇:
Python api.TextHelper类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap