入门

可以先看我这个博客,知道基本知识:

QScintilla学习大全_我是标同学的博客-CSDN博客_qscintilla

根据类的继承关系,我们能直接使用的信号在 QsciScintillaBase 和 QsciScintilla(是对前面的这个基类的进一步封装而已) 这个类里。

但是QsciScintilla类给出的信号较少(只有常用的)

打开 qsciscintillabase.h 文件,可以看到所有的信号函数12个如下:

signals:
//! This signal is emitted whenever the cursor position changes.  \a line
//! contains the line number and \a index contains the character index
//! within the line.
//光标位置改变了
void cursorPositionChanged(int line, int index);

//! This signal is emitted whenever text is selected or de-selected.
//! \a yes is true if text has been selected and false if text has been
//! deselected.  If \a yes is true then copy() can be used to copy the
//! selection to the clipboard.  If \a yes is false then copy() does
//! nothing. 
//!
//! \sa copy(), selectionChanged()
//有选中的文本所以此时复制是可以的了
void copyAvailable(bool yes);

//! This signal is emitted whenever the user clicks on an indicator.  \a
//! line is the number of the line where the user clicked.  \a index is the
//! character index within the line.  \a state is the state of the modifier
//! keys (Qt::ShiftModifier, Qt::ControlModifier, Qt::AltModifer and
//! Qt::MetaModifier) when the user clicked.
//!
//! \sa indicatorReleased()
//点击了具有指示器的文本
void indicatorClicked(int line, int index, Qt::KeyboardModifiers state);

//! This signal is emitted whenever the user releases the mouse on an
//! indicator.  \a line is the number of the line where the user clicked.
//! \a index is the character index within the line.  \a state is the state
//! of the modifier keys (Qt::ShiftModifier, Qt::ControlModifier,
//! Qt::AltModifer and Qt::MetaModifier) when the user released the mouse.
//!
//! \sa indicatorClicked()
//单击按钮释放了具有指示器的文本
void indicatorReleased(int line, int index, Qt::KeyboardModifiers state);

//! This signal is emitted whenever the number of lines of text changes.
//文本的总行数发生了改变
void linesChanged();

//! This signal is emitted whenever the user clicks on a sensitive margin.
//! \a margin is the margin.  \a line is the number of the line where the
//! user clicked.  \a state is the state of the modifier keys
//! (Qt::ShiftModifier, Qt::ControlModifier, Qt::AltModifer and
//! Qt::MetaModifier) when the user clicked.
//!
//! \sa marginSensitivity(), setMarginSensitivity()
//margin栏左键单击了
void marginClicked(int margin, int line, Qt::KeyboardModifiers state);

//! This signal is emitted whenever the user right-clicks on a sensitive
//! margin.  \a margin is the margin.  \a line is the number of the line
//! where the user clicked.  \a state is the state of the modifier keys
//! (Qt::ShiftModifier, Qt::ControlModifier, Qt::AltModifer and
//! Qt::MetaModifier) when the user clicked.
//!
//! \sa marginSensitivity(), setMarginSensitivity()
//margin栏右键单击了
void marginRightClicked(int margin, int line, Qt::KeyboardModifiers state);

//! This signal is emitted whenever the user attempts to modify read-only
//! text.
//!
//! \sa isReadOnly(), setReadOnly()
//试图修改只读文本
void modificationAttempted();

//! This signal is emitted whenever the modification state of the text
//! changes.  \a m is true if the text has been modified.
//!
//! \sa isModified(), setModified()
//文本被修改了
void modificationChanged(bool m);

//! This signal is emitted whenever the selection changes.
//!
//! \sa copyAvailable()
//选择改变了。这个函数我测试了有问题,鼠标只要按下,这个信号就会一直触发,没搞懂为什么要这样(按道理说不应该的),分析了一下,源码层次比较深,就没搞了,知道的评论区告诉我
void selectionChanged();

//! This signal is emitted whenever the text in the text edit changes.
//文本内容被改变了
void textChanged();

//! This signal is emitted when an item in a user defined list is activated
//! (selected).  \a id is the list identifier.  \a string is the text of
//! the item.
//!
//! \sa showUserList()
//用户自定义文本活跃了,也就是被选中了
void userListActivated(int id, const QString &string);


其实上面的这些再次封装的信号函数,是由下面的这些信号函数再次组合和封装的而已。

其它的信号函数是在 QsciScintillaBase 这个类里

打开 qsciscintillabase.h 文件,可以看到所有的信号函数33个如下:

signals:
//! This signal is emitted when text is selected or de-selected.
//! \a yes is true if text has been selected and false if text has been
//! deselected.
//文本被选中或者取消选中了
void QSCN_SELCHANGED(bool yes);    

//! This signal is emitted when the user cancels an auto-completion list.
//!
//! \sa SCN_AUTOCSELECTION()
//用户取消一个自动完成列表了
void SCN_AUTOCCANCELLED();        

//! This signal is emitted when the user deletes a character when an
//! auto-completion list is active.
//当自动完成列表活跃时,用户删除一个字符了
void SCN_AUTOCCHARDELETED();

//! This signal is emitted after an auto-completion has inserted its text.
//! \a selection is the text of the selection.  \a position is the start
//! position of the word being completed.  \a ch is the fillup character
//! that triggered the selection if method is SC_AC_FILLUP.  \a method is
//! the method used to trigger the selection.
//!
//! \sa SCN_AUTOCCANCELLED(), SCN_AUTOCSELECTION()
//自动完成列表中的项插入到了我们的文本中了
void SCN_AUTOCCOMPLETED(const char *selection, int position, int ch, int method);

//! This signal is emitted when the user selects an item in an
//! auto-completion list.  It is emitted before the selection is inserted.
//! The insertion can be cancelled by sending an SCI_AUTOCANCEL message
//! from a connected slot.
//! \a selection is the text of the selection.  \a position is the start
//! position of the word being completed.  \a ch is the fillup character
//! that triggered the selection if method is SC_AC_FILLUP.  \a method is
//! the method used to trigger the selection.
//!
//! \sa SCN_AUTOCCANCELLED(), SCN_AUTOCCOMPLETED()

//用户选择了自动完成列表中的一个项
void SCN_AUTOCSELECTION(const char *selection, int position, int ch, int method);

//! \overload
void SCN_AUTOCSELECTION(const char *selection, int position);

//! This signal is emitted when the user highlights an item in an
//! auto-completion or user list.
//! \a selection is the text of the selection.  \a id is an identifier for
//! the list which was passed as an argument to the SCI_USERLISTSHOW
//! message or 0 if the list is an auto-completion list.  \a position is
//! the position that the list was displayed at.
//用户强调了自动完成列表中的一个项
void SCN_AUTOCSELECTIONCHANGE(const char *selection, int id, int position);

//! This signal is emitted when the document has changed for any reason.
//文档发生了改变
void SCEN_CHANGE();

//! This signal is emitted when the user clicks on a calltip.
//! \a direction is 1 if the user clicked on the up arrow, 2 if the user
//! clicked on the down arrow, and 0 if the user clicked elsewhere.
//用户点击了一个提示信息
void SCN_CALLTIPCLICK(int direction);

//! This signal is emitted whenever the user enters an ordinary character
//! into the text.
//! \a charadded is the character. It can be used to decide to display a
//! call tip or an auto-completion list.
//用户输入了一个字符到文本中
void SCN_CHARADDED(int charadded);

//! This signal is emitted when the user double clicks.
//! \a position is the position in the text where the click occured.
//! \a line is the number of the line in the text where the click occured.
//! \a modifiers is the logical or of the modifier keys that were pressed
//! when the user double clicked.
//用户双击了鼠标
void SCN_DOUBLECLICK(int position, int line, int modifiers);

//! This signal is emitted when the user moves the mouse (or presses a key)
//! after keeping it in one position for the dwell period.
//! \a position is the position in the text where the mouse dwells.
//! \a x is the x-coordinate where the mouse dwells.  \a y is the
//! y-coordinate where the mouse dwells.
//! 
//! \sa SCN_DWELLSTART, SCI_SETMOUSEDWELLTIME
//用户停留鼠标一段时间后移动了鼠标或者按下了按键
void SCN_DWELLEND(int position, int x, int y);

//! This signal is emitted when the user keeps the mouse in one position
//! for the dwell period.
//! \a position is the position in the text where the mouse dwells.
//! \a x is the x-coordinate where the mouse dwells.  \a y is the
//! y-coordinate where the mouse dwells.
//!
//! \sa SCN_DWELLEND, SCI_SETMOUSEDWELLTIME
//用户停留鼠标一段时间了
void SCN_DWELLSTART(int position, int x, int y);

//! This signal is emitted when focus is received.
//获得了焦点
void SCN_FOCUSIN();

//! This signal is emitted when focus is lost.
//失去了焦点
void SCN_FOCUSOUT();

//! This signal is emitted when the user clicks on text in a style with the
//! hotspot attribute set.
//! \a position is the position in the text where the click occured.
//! \a modifiers is the logical or of the modifier keys that were pressed
//! when the user clicked.
//单击了一个设置了热点样式的文本
void SCN_HOTSPOTCLICK(int position, int modifiers);

//! This signal is emitted when the user double clicks on text in a style
//! with the hotspot attribute set.
//! \a position is the position in the text where the double click occured.
//! \a modifiers is the logical or of the modifier keys that were pressed
//! when the user double clicked.
//双击了一个设置了热点样式的文本
void SCN_HOTSPOTDOUBLECLICK(int position, int modifiers);

//! This signal is emitted when the user releases the mouse button on text
//! in a style with the hotspot attribute set.
//! \a position is the position in the text where the release occured.
//! \a modifiers is the logical or of the modifier keys that were pressed
//! when the user released the button.
//单击释放了一个设置了热点样式的文本
void SCN_HOTSPOTRELEASECLICK(int position, int modifiers);

//! This signal is emitted when the user clicks on text that has an
//! indicator.
//! \a position is the position in the text where the click occured.
//! \a modifiers is the logical or of the modifier keys that were pressed
//! when the user clicked.
//单击了一个设置了指示器的文本
void SCN_INDICATORCLICK(int position, int modifiers);

//! This signal is emitted when the user releases the mouse button on text
//! that has an indicator.
//! \a position is the position in the text where the release occured.
//! \a modifiers is the logical or of the modifier keys that were pressed
//! when the user released.
//单击释放了一个设置了指示器的文本
void SCN_INDICATORRELEASE(int position, int modifiers);

//! This signal is emitted when a recordable editor command has been
//! executed.
//执行了一个可记录的编辑器命令
void SCN_MACRORECORD(unsigned int, unsigned long, void *);

//! This signal is emitted when the user clicks on a sensitive margin.
//! \a position is the position of the start of the line against which the
//! user clicked.
//! \a modifiers is the logical or of the modifier keys that were pressed
//! when the user clicked.
//! \a margin is the number of the margin the user clicked in: 0, 1 or 2.
//! 
//! \sa SCI_GETMARGINSENSITIVEN, SCI_SETMARGINSENSITIVEN
//左键点击了margin栏
void SCN_MARGINCLICK(int position, int modifiers, int margin);

//! This signal is emitted when the user right-clicks on a sensitive
//! margin.  \a position is the position of the start of the line against
//! which the user clicked.
//! \a modifiers is the logical or of the modifier keys that were pressed
//! when the user clicked.
//! \a margin is the number of the margin the user clicked in: 0, 1 or 2.
//! 
//! \sa SCI_GETMARGINSENSITIVEN, SCI_SETMARGINSENSITIVEN
//右键点击了margin栏
void SCN_MARGINRIGHTCLICK(int position, int modifiers, int margin);

//!
//文本内容发生了改变
void SCN_MODIFIED(int, int, const char *, int, int, int, int, int, int, int);

//! This signal is emitted when the user attempts to modify read-only
//! text.
//试图修改一个只读文本
void SCN_MODIFYATTEMPTRO();

//!
//没了解,不知道啥意思,知道的评论区告诉我
void SCN_NEEDSHOWN(int, int);

//! This signal is emitted when painting has been completed.  It is useful
//! to trigger some other change but to have the paint be done first to
//! appear more reponsive to the user.
//编辑器界面重绘完成了发射的信号,这个在我们想在这之后做一些后续事情很有用
void SCN_PAINTED();

//! This signal is emitted when the current state of the text no longer
//! corresponds to the state of the text at the save point.
//! 
//! \sa SCI_SETSAVEPOINT, SCN_SAVEPOINTREACHED()
//文本的状态和前一次保存时候的状态不再一致了
void SCN_SAVEPOINTLEFT();

//! This signal is emitted when the current state of the text corresponds
//! to the state of the text at the save point. This allows feedback to be
//! given to the user as to whether the text has been modified since it was
//! last saved.
//! 
//! \sa SCI_SETSAVEPOINT, SCN_SAVEPOINTLEFT()
//文本的状态和前一次保存时候的状态又一致了。当我们想告诉用户文本仍然未发生过改变,很有用
void SCN_SAVEPOINTREACHED();

//! This signal is emitted when a range of text needs to be syntax styled.
//! The range is from the value returned by the SCI_GETENDSTYLED message
//! and \a position.  It is only emitted if the currently selected lexer is
//! SCLEX_CONTAINER.
//!
//! \sa SCI_COLOURISE, SCI_GETENDSTYLED
//文本需要被语法分析???不知道具体意思,知道的评论区告诉我
void SCN_STYLENEEDED(int position);

//! This signal is emitted when a URI is dropped.
//! \a url is the value of the URI.
//当拖入了一个URI路径放下了
void SCN_URIDROPPED(const QUrl &url);

//! This signal is emitted when either the text or styling of the text has
//! changed or the selection range or scroll position has changed.
//! \a updated contains the set of SC_UPDATE_* flags describing the changes
//! since the signal was last emitted.
//界面发生更新,比如文本改变,文本着色改变,选择范围改变,滑动窗口等
void SCN_UPDATEUI(int updated);

//! This signal is emitted when the user selects an item in a user list.
//! \a selection is the text of the selection.  \a id is an identifier for
//! the list which was passed as an argument to the SCI_USERLISTSHOW
//! message and must be at least 1.  \a ch is the fillup character that
//! triggered the selection if method is SC_AC_FILLUP.  \a method is the
//! method used to trigger the selection.  \a position is the position that
//! the list was displayed at.
//!
//! \sa SCI_USERLISTSHOW, SCN_AUTOCSELECTION()
//选中了用户列表中的某一项
void SCN_USERLISTSELECTION(const char *selection, int id, int ch, int method, int position);

//! \overload
void SCN_USERLISTSELECTION(const char *selection, int id, int ch, int method);

//! \overload
void SCN_USERLISTSELECTION(const char *selection, int id);

//!
//编辑器发生了缩放,比如 ctrl+鼠标滚轮 进行了放大或者缩小
void SCN_ZOOM();

QScintilla的信号汇总和解释相关推荐

  1. 阿里云产品汇总及解释

    阿里云产品汇总及解释 1. 场景描述 最近博客更新的少,跟朋友一起做些事情,最近主要给朋友做些售前工作,阿里云的产品线是真多,好多英文缩写,需要做沟通,系统汇总了一下,记录下,有需要的朋友拿走不谢. ...

  2. 关于视频中的速率问题,海思视频速率(高速信号与高频信号区分与解释)

    写在前面,因这篇文档是很早之前整理的,忘记在哪里看到的别人总结好的,我稍作修改整理.后面关于海思视频处理过程及速率是我自己写的. 高速信号与高频信号区分与解释 Candence公司对高速信号的判断: ...

  3. 磁共振信号库matlab,【图文详解】磁共振(MRI)信号汇总

    让学习成为一种习惯! 医学影像服务中心拥有500病例征象+讲座 [医学影像服务中心]整理 脂肪.骨髓不论在T1WI.T2WI和PDWI(质子加权像)图像上均呈高信号 肌肉.肌腱.韧带:肌肉在T1WI. ...

  4. linux. signal信号,Linux下signal信号汇总

    SIGHUP /* Hangup (POSIX). */ 终止进程 终端线路挂断 SIGINT /* Interrupt (ANSI). */ 终止进程 中断进程 Ctrl+C SIGQUIT /* ...

  5. 信号方面概念解释(笔记04)

    1.信号:信息的承载方式,数学上表示为一个或多个变量的函数(自变量通常为时间t,也可以是高度.深度等). 连续时间信号:信号函数的定义域是连续的,常用想x(t)来表示,即x是连续变量t的函数.例如,一 ...

  6. 有关linux信号汇总

    SIGINT SIGKILL SIGTERM 这三个信号都是用于终止程序,具体差别为: SIGINT 通过ctrl+c 发送,可以被捕获.此信号被当前进程树接收到,也就是说,不仅当前进程会收到信号,它 ...

  7. 关于雷达信号“相干性”的解释

    总结自刘春静老师的博客,充实一下自己对雷达信号的认知 文章目录 相干概念 争议 工程认知 参考文献 相干概念 "相干"也叫"相参".相干性一词来源于光学:设两点 ...

  8. java signal信号_signal 信号具体含义解释~

    1) SIGHUP 本信号在用户终端连接(正常或非正常)结束时发出,通常是在终端的控 制进程结束时, 通知同一session内的各个作业,这时它们与控制终端不再关联.2) SIGINT 程序终止(in ...

  9. PXI Express外设板信号汇总(更新中)

    CompactPCI Express部分 PCI Express通信 PETpx // PCI Express Transmitter positive, Lane x PETnx // PCI Ex ...

最新文章

  1. MINIGUI 开发指南---GDI
  2. 很久没来了,嘿嘿 问候一下大家,O(∩_∩)O哈哈~
  3. 第九大陆服务器未找到文件,第九大陆服务器优化规则说明 拍卖行和寄售功能关闭公告...
  4. 基于鸿蒙Hi3861和华为云平台的烟雾报警器(附源码)
  5. 显示recv调用次数_腾讯云“云开发”日调用超7亿次,只为和开发者“交个朋友”...
  6. mysql 查询数据库名是否存在_SQL查询数据库是否存在
  7. Sublime Text 3 设置
  8. Dockerfile封装Django镜像
  9. echart移上去显示内容_Echarts X轴内容过长自动隐藏,鼠标移动上去显示全部名称方法...
  10. 组建局域网_局域网组建常用的网线种类解读
  11. Dos命令查看wifi密码
  12. jest中的mock,jest.fn()、jest.spyOn()、jest.mock()
  13. CorelDRAW教程大全集
  14. 把unc0ver.ipa重签名后安装到手机上实现越狱
  15. java 小程序 自己学习
  16. 数据仓库(五)元数据管理
  17. 钢铁是怎样炼成的之彭明盛
  18. 安卓手机使用LEAP企业Wifi网络(公司内部的证书方式)
  19. Codeforces #839A: Arya and Bran 题解
  20. Android开发:申请华为开发者账号步骤

热门文章

  1. 选择 Delphi 2007 ( CodeGear Delphi 2007 for Win32 Version 11.0.2837.9583 ) 的理由
  2. Solr--Solr 使用SolrJ 完成添加,删除,查询
  3. Telegraf-Influxdb-Grafana容器化部署拓展(Https、AD域、告警集成)并监控Cisco设备指标
  4. [经济生活基本知识]商品,货币,价值规律
  5. Charmer--viv【并查集】【最小生成树】
  6. 链表综合案例(超市购物车)
  7. 2023最新SSM计算机毕业设计选题大全(附源码+LW)之java水果生鲜销售系统7826c
  8. python里load什么意思_【python】json中load和loads区别
  9. 【大数进制转换】清华大学考研复试上机——进制转换(10—2)
  10. Canvas + CSS3实现可视化项目开场动画