cutter/src/common/SelectionHighlight.h

49 lines
1.6 KiB
C
Raw Normal View History

#ifndef CUTTER_SELECTIONHIGHLIGHT_H
#define CUTTER_SELECTIONHIGHLIGHT_H
#include <QTextEdit>
class QPlainTextEdit;
class QString;
/**
* @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);
/**
* @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, ...)
* @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
* @param cursor - a Cursor object represents the line to be highlighted
* @return ExtraSelection with highlighted line
*/
QTextEdit::ExtraSelection createLineHighlightSelection(const QTextCursor &cursor);
/**
2021-01-24 14:50:13 +00:00
* @brief This function responsible to highlight the program counter line
* @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