#include <Workspace/Widgets/jsedit.h>
Inherits QPlainTextEdit.
|
enum | ColorComponent {
Background
, Normal
, Comment
, Number
,
String
, Operator
, Identifier
, Keyword
,
BuiltIn
, Sidebar
, LineNumber
, Cursor
,
Marker
, BracketMatch
, BracketError
, FoldIndicator
,
Custom = 110
} |
|
◆ ColorComponent
Enumerator |
---|
Background | |
Normal | |
Comment | |
Number | |
String | |
Operator | |
Identifier | |
Keyword | |
BuiltIn | |
Sidebar | |
LineNumber | |
Cursor | |
Marker | |
BracketMatch | |
BracketError | |
FoldIndicator | |
Custom | |
◆ JSEdit()
JSEdit |
( |
QWidget * |
parent = nullptr | ) |
|
◆ ~JSEdit()
◆ focusOut
◆ focusOutEvent()
void focusOutEvent |
( |
QFocusEvent * |
event | ) |
|
|
override |
◆ fold
◆ getReplaceTabsWithSpaces()
bool getReplaceTabsWithSpaces |
( |
| ) |
const |
Returns true if the widget is configured to replace tabs with spaces, or false otherwise.
◆ isBracketsMatchingEnabled()
bool isBracketsMatchingEnabled |
( |
| ) |
const |
◆ isCodeFoldingEnabled()
bool isCodeFoldingEnabled |
( |
| ) |
const |
◆ isFoldable()
bool isFoldable |
( |
int |
line | ) |
const |
◆ isFolded()
bool isFolded |
( |
int |
line | ) |
const |
◆ isLineNumbersVisible()
bool isLineNumbersVisible |
( |
| ) |
const |
◆ isTextWrapEnabled()
bool isTextWrapEnabled |
( |
| ) |
const |
◆ keyPressEvent()
void keyPressEvent |
( |
QKeyEvent * |
e | ) |
|
|
overrideprotected |
◆ keywords()
◆ mark
void mark |
( |
const QString & |
str, |
|
|
Qt::CaseSensitivity |
sens = Qt::CaseInsensitive |
|
) |
| |
|
slot |
◆ replaceTabsWithSpaces()
void replaceTabsWithSpaces |
( |
bool |
bEnable, |
|
|
int |
numSpaces = 4 |
|
) |
| |
When enabled, tabs in JsEdit will be replaced with spaces. The number of spaces is 4 by default, but can be over-ridden by passing an appropriate value for parameter numSpaces.
- Parameters
-
bEnable | Enables tab / space replacement functionality on keypress. |
numSpaces | The number of spaces to use in place of a tab. |
◆ resizeEvent()
void resizeEvent |
( |
QResizeEvent * |
e | ) |
|
|
overrideprotected |
◆ setBracketsMatchingEnabled
void setBracketsMatchingEnabled |
( |
bool |
enable | ) |
|
|
slot |
◆ setCodeFoldingEnabled
void setCodeFoldingEnabled |
( |
bool |
enable | ) |
|
|
slot |
◆ setColor()
◆ setCustomKeywords()
◆ setKeywords()
◆ setLineNumbersVisible
void setLineNumbersVisible |
( |
bool |
visible | ) |
|
|
slot |
◆ setTextWrapEnabled
void setTextWrapEnabled |
( |
bool |
enable | ) |
|
|
slot |
◆ toggleFold
void toggleFold |
( |
int |
line | ) |
|
|
slot |
◆ unfold
◆ updateSidebar
◆ wheelEvent()
void wheelEvent |
( |
QWheelEvent * |
e | ) |
|
|
overrideprotected |
◆ bracketsMatchingEnabled
bool bracketsMatchingEnabled |
|
readwrite |
◆ codeFoldingEnabled
◆ lineNumbersVisible
◆ textWrapEnabled