Workspace 6.21.5
Public Types | Signals | Public Member Functions | Properties | List of all members
JSEditWidget Class Reference

A wrapper class of JSEdit with enriched functions of opening and saving scripts.

#include <Workspace/Widgets/jseditwidget.h>

Inherits QWidget.

Public Types

typedef JSEdit::ColorComponent ColorComponent
 

Signals

void focusOut ()
 
void textChanged ()
 

Public Member Functions

 JSEditWidget (QWidget *parent=nullptr)
 
 ~JSEditWidget () override
 
bool getReplaceTabs () const
 
bool getShowSaveLoadAndTabsWidgets () const
 
bool isBracketsMatchingEnabled () const
 
bool isCodeFoldingEnabled () const
 
bool isFoldable (int line) const
 
bool isFolded (int line) const
 
bool isLineNumbersVisible () const
 
bool isTextWrapEnabled () const
 
QStringList keywords () const
 
void setColor (ColorComponent component, const QColor &color)
 
void setKeywords (const QStringList &keywords)
 
void setPlainText (const QString &text)
 
void setReadOnly (bool b)
 
void setReplaceTabs (bool enable)
 
void setShowSaveLoadAndTabsWidgets (bool enable)
 
QString toPlainText () const
 

Properties

bool replaceTabsWithSpaces
 
bool showSaveLoadAndTabsWidgets
 

Member Typedef Documentation

◆ ColorComponent

Constructor & Destructor Documentation

◆ JSEditWidget()

JSEditWidget ( QWidget *  parent = nullptr)
explicit

An instance of JSEdit, open and save-as button are created and wait for further configuration in init().

◆ ~JSEditWidget()

~JSEditWidget ( )
override

Member Function Documentation

◆ focusOut

void focusOut ( )
signal

◆ getReplaceTabs()

bool getReplaceTabs ( ) const

Exposes the underlying Q_PROPERTY which decides whether or not to replace tabs with spaces in the underlying JsEdit widget

◆ getShowSaveLoadAndTabsWidgets()

bool getShowSaveLoadAndTabsWidgets ( ) const

Returns if the save, load and 'spaces to tabs' UI elements are enabled

◆ 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

◆ keywords()

QStringList keywords ( ) const

◆ setColor()

void setColor ( ColorComponent  component,
const QColor &  color 
)

◆ setKeywords()

void setKeywords ( const QStringList keywords)

◆ setPlainText()

void setPlainText ( const QString &  text)

◆ setReadOnly()

void setReadOnly ( bool  b)

◆ setReplaceTabs()

void setReplaceTabs ( bool  enable)

Enables or disables the Widget's ability to replace tabs with spaces.

◆ setShowSaveLoadAndTabsWidgets()

void setShowSaveLoadAndTabsWidgets ( bool  enable)

Enables the save, load and 'spaces to tabs' UI elements

◆ textChanged

void textChanged ( )
signal

◆ toPlainText()

QString toPlainText ( ) const

Property Documentation

◆ replaceTabsWithSpaces

bool replaceTabsWithSpaces
readwrite

◆ showSaveLoadAndTabsWidgets

bool showSaveLoadAndTabsWidgets
readwrite