te::qt::widgets::ScriptWidget Class Reference

A widget that can be used to edit a script. More...

#include <ScriptWidget.h>

Inheritance diagram for te::qt::widgets::ScriptWidget:

Public Member Functions

QString getFileName () const
 Returns the file name of the script. More...
 
QString getScriptName () const
 getScriptName More...
 
QString getScriptType () const
 getScriptType More...
 
void open (const QString &fileName)
 Open the script file and presents it on the text edit. More...
 
void save (const QString &fileName)
 Saves the content of the script into a file. More...
 
 ScriptWidget (QWidget *parent=0)
 ScriptWidget. More...
 
void setDirty (bool dirty)
 Sets the status of the widget. True if the text was modified, false otherwise. More...
 
void setHighlightMode (const QString &mode)
 Sets the highlight mode for the script. More...
 
 ~ScriptWidget ()
 Destructor. More...
 

Private Attributes

bool m_dirty
 Text was changed status. More...
 
QString m_fileName
 File name. More...
 

Detailed Description

A widget that can be used to edit a script.

Definition at line 56 of file ScriptWidget.h.

Constructor & Destructor Documentation

te::qt::widgets::ScriptWidget::ScriptWidget ( QWidget *  parent = 0)

ScriptWidget.

Parameters
parent
te::qt::widgets::ScriptWidget::~ScriptWidget ( )

Destructor.

Member Function Documentation

QString te::qt::widgets::ScriptWidget::getFileName ( ) const
inline

Returns the file name of the script.

Returns
File name.

Definition at line 76 of file ScriptWidget.h.

QString te::qt::widgets::ScriptWidget::getScriptName ( ) const

getScriptName

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

getScriptType

Returns
Returns the type of the script based on its extension.
void te::qt::widgets::ScriptWidget::open ( const QString &  fileName)

Open the script file and presents it on the text edit.

Parameters
fileNameFile name.
void te::qt::widgets::ScriptWidget::save ( const QString &  fileName)

Saves the content of the script into a file.

Parameters
fileNameName of the file.
void te::qt::widgets::ScriptWidget::setDirty ( bool  dirty)

Sets the status of the widget. True if the text was modified, false otherwise.

Parameters
dirtyStatus to be set.
void te::qt::widgets::ScriptWidget::setHighlightMode ( const QString &  mode)

Sets the highlight mode for the script.

Parameters
modeName of the mode.
Note
Currently supported modes are: py, lua, sql.

Member Data Documentation

bool te::qt::widgets::ScriptWidget::m_dirty
private

Text was changed status.

Definition at line 128 of file ScriptWidget.h.

QString te::qt::widgets::ScriptWidget::m_fileName
private

File name.

Definition at line 127 of file ScriptWidget.h.


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