-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathExtendedScintilla.h
More file actions
58 lines (47 loc) · 1.59 KB
/
ExtendedScintilla.h
File metadata and controls
58 lines (47 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef EXTENDEDSCINTILLA_H
#define EXTENDEDSCINTILLA_H
#include "Qsci/qsciscintilla.h"
class FindReplaceDialog;
class QShortcut;
/**
* @brief The ExtendedScintilla class
* This class extends the QScintilla widget for the application
*/
class ExtendedScintilla : public QsciScintilla
{
Q_OBJECT
public:
explicit ExtendedScintilla(QWidget *parent = nullptr);
bool findText(QString text, bool regexp, bool caseSensitive, bool words, bool wrap, bool forward);
void setEnabledFindDialog(bool value);
void clearSelection();
// Override parent setLexer
void setLexer(QsciLexer *lexer) override;
// Override parent setReadOnly
void setReadOnly(bool ro) override;
// Override parent setText
void setText(const QString& text) override;
public slots:
void reloadKeywords();
void reloadSettings();
void clearErrorIndicators();
void setErrorIndicator(int fromRow, int fromIndex, int toRow, int toIndex);
// Set error indicator from position to end of line
void setErrorIndicator(int position);
void openFindReplaceDialog();
void openFindDialog();
void openPrintDialog();
protected:
void dropEvent(QDropEvent* e) override;
void setupSyntaxHighlightingFormat(QsciLexer* lexer, const std::string& settings_name, int style);
void reloadLexerSettings(QsciLexer *lexer);
void reloadCommonSettings();
int errorIndicatorNumber;
bool showErrorIndicators;
FindReplaceDialog* findReplaceDialog;
QShortcut* shortcutFind;
private slots:
void updateLineNumberAreaWidth();
void showContextMenu(const QPoint &pos);
};
#endif