te::ce::ScriptWidget Class Reference

A widget that can be used to show and control the execution of a script. More...

#include <ScriptWidget.h>

Inheritance diagram for te::ce::ScriptWidget:

Public Slots

void close ()
 Closes the current script. More...
 
void execute ()
 Executes the current script. More...
 
void pause ()
 Pauses the execution. More...
 
void save ()
 Saves the current file. More...
 
void saveAs ()
 saveAs Saves the current file in a different file. More...
 
void setTextChanged ()
 Sets to true the textChanged flag. More...
 
void stop ()
 Stops the execution of the script. More...
 
void zoomIn ()
 Zoom in. More...
 
void zoomOut ()
 Zoom out. More...
 

Signals

void codeChanged ()
 

Public Member Functions

QString getFileName () const
 Returns the file name of the script. More...
 
QString getScriptName () const
 getScriptName More...
 
QString getScriptType () const
 getScriptType More...
 
bool hasChanged () const
 Returns the flag that signals if the code was edited. More...
 
void open (const QString &fileName)
 Open the code file and presents it on the screen. More...
 
void save (const QString &fileName)
 Save the contents code in a file. More...
 
 ScriptWidget (QWidget *parent)
 ScriptWidget. More...
 
 ~ScriptWidget ()
 Destructor. More...
 

Protected Member Functions

void saveFile (const QString &fileName)
 Saves the name of the file. More...
 
void setLexer ()
 setLexer. More...
 
void setUnsaved (bool unsaved)
 

Private Attributes

QString m_fileName
 File name. More...
 
QsciLexer * m_lexer
 The text editor owns the lexer. More...
 
QsciScintilla * m_txtEditor
 The editor with grammatical highlighted marks. More...
 
bool m_unsaved
 Code has changed? More...
 

Detailed Description

A widget that can be used to show and control the execution of a script.

Definition at line 52 of file ScriptWidget.h.

Constructor & Destructor Documentation

te::ce::ScriptWidget::ScriptWidget ( QWidget *  parent)

ScriptWidget.

Parameters
parent
te::ce::ScriptWidget::~ScriptWidget ( )

Destructor.

Member Function Documentation

void te::ce::ScriptWidget::close ( )
slot

Closes the current script.

void te::ce::ScriptWidget::codeChanged ( )
signal
void te::ce::ScriptWidget::execute ( )
slot

Executes the current script.

QString te::ce::ScriptWidget::getFileName ( ) const
inline

Returns the file name of the script.

Returns
File name.

Definition at line 73 of file ScriptWidget.h.

QString te::ce::ScriptWidget::getScriptName ( ) const

getScriptName

Returns
Return the script name.
QString te::ce::ScriptWidget::getScriptType ( ) const

getScriptType

Returns
Returns the type of the script based on its extension.
bool te::ce::ScriptWidget::hasChanged ( ) const

Returns the flag that signals if the code was edited.

Returns
Returns true or false.
void te::ce::ScriptWidget::open ( const QString &  fileName)

Open the code file and presents it on the screen.

Parameters
fileNameFile name.
void te::ce::ScriptWidget::pause ( )
slot

Pauses the execution.

void te::ce::ScriptWidget::save ( const QString &  fileName)

Save the contents code in a file.

Parameters
fileNameName of the file.
void te::ce::ScriptWidget::save ( )
slot

Saves the current file.

void te::ce::ScriptWidget::saveAs ( )
slot

saveAs Saves the current file in a different file.

void te::ce::ScriptWidget::saveFile ( const QString &  fileName)
protected

Saves the name of the file.

Parameters
fileNameThe complete path of the script.
void te::ce::ScriptWidget::setLexer ( )
protected

setLexer.

void te::ce::ScriptWidget::setTextChanged ( )
slot

Sets to true the textChanged flag.

void te::ce::ScriptWidget::setUnsaved ( bool  unsaved)
protected
void te::ce::ScriptWidget::stop ( )
slot

Stops the execution of the script.

void te::ce::ScriptWidget::zoomIn ( )
slot

Zoom in.

void te::ce::ScriptWidget::zoomOut ( )
slot

Zoom out.

Member Data Documentation

QString te::ce::ScriptWidget::m_fileName
private

File name.

Definition at line 165 of file ScriptWidget.h.

QsciLexer* te::ce::ScriptWidget::m_lexer
private

The text editor owns the lexer.

Definition at line 164 of file ScriptWidget.h.

QsciScintilla* te::ce::ScriptWidget::m_txtEditor
private

The editor with grammatical highlighted marks.

Definition at line 163 of file ScriptWidget.h.

bool te::ce::ScriptWidget::m_unsaved
private

Code has changed?

Definition at line 166 of file ScriptWidget.h.


The documentation for this class was generated from the following file: