2019-07-12 08:57:07 +00:00
|
|
|
#ifndef CUTTER_SELECTIONHIGHLIGHT_H
|
|
|
|
#define CUTTER_SELECTIONHIGHLIGHT_H
|
|
|
|
|
|
|
|
#include <QTextEdit>
|
|
|
|
|
|
|
|
class QPlainTextEdit;
|
|
|
|
class QString;
|
|
|
|
|
2019-12-19 17:58:30 +00:00
|
|
|
/**
|
|
|
|
* @brief createSameWordsSelections se
|
|
|
|
* @param textEdit
|
|
|
|
* @param word
|
|
|
|
* @return
|
|
|
|
*/
|
2021-01-24 14:50:13 +00:00
|
|
|
QList<QTextEdit::ExtraSelection> createSameWordsSelections(QPlainTextEdit *textEdit,
|
|
|
|
const QString &word);
|
2019-12-19 17:58:30 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief createLineHighlight
|
|
|
|
* @param cursor - a Cursor object represents the line to be highlighted
|
2021-01-24 14:50:13 +00:00
|
|
|
* @param highlightColor - the color to be used for highlighting. The color is decided by the callee
|
|
|
|
* for different usages (BP, PC, Current line, ...)
|
2019-12-19 17:58:30 +00:00
|
|
|
* @return ExtraSelection with highlighted line
|
|
|
|
*/
|
|
|
|
QTextEdit::ExtraSelection createLineHighlight(const QTextCursor &cursor, QColor highlightColor);
|
|
|
|
|
|
|
|
/**
|
2021-01-24 14:50:13 +00:00
|
|
|
* @brief This function responsible to highlight the currently selected line
|
2019-12-19 17:58:30 +00:00
|
|
|
* @param cursor - a Cursor object represents the line to be highlighted
|
|
|
|
* @return ExtraSelection with highlighted line
|
|
|
|
*/
|
2019-07-12 08:57:07 +00:00
|
|
|
QTextEdit::ExtraSelection createLineHighlightSelection(const QTextCursor &cursor);
|
|
|
|
|
2019-12-19 17:58:30 +00:00
|
|
|
/**
|
2021-01-24 14:50:13 +00:00
|
|
|
* @brief This function responsible to highlight the program counter line
|
2019-12-19 17:58:30 +00:00
|
|
|
* @param cursor - a Cursor object represents the line to be highlighted
|
|
|
|
* @return ExtraSelection with highlighted line
|
|
|
|
*/
|
|
|
|
QTextEdit::ExtraSelection createLineHighlightPC(const QTextCursor &cursor);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief This function responsible to highlight a line with breakpoint
|
|
|
|
* @param cursor - a Cursor object represents the line to be highlighted
|
|
|
|
* @return ExtraSelection with highlighted line
|
|
|
|
*/
|
|
|
|
QTextEdit::ExtraSelection createLineHighlightBP(const QTextCursor &cursor);
|
|
|
|
|
2021-01-24 14:50:13 +00:00
|
|
|
#endif // CUTTER_SELECTIONHIGHLIGHT_H
|