A widget that can be used to edit a script. More...
#include <ScriptWidget.h>
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... | |
A widget that can be used to edit a script.
Definition at line 56 of file ScriptWidget.h.
| te::qt::widgets::ScriptWidget::ScriptWidget | ( | QWidget * | parent = 0 | ) |
|
default |
Destructor.
Referenced by ScriptWidget().
|
inline |
Returns the file name of the script.
Definition at line 76 of file ScriptWidget.h.
Referenced by te::ce::CodeEditorDialog::onRunButtonClicked(), and te::ce::CodeEditorDialog::save().
| QString te::qt::widgets::ScriptWidget::getScriptName | ( | ) | const |
getScriptName
Definition at line 67 of file ScriptWidget.cpp.
References m_fileName.
Referenced by te::ce::CodeEditorDialog::onRunButtonClicked().
| QString te::qt::widgets::ScriptWidget::getScriptType | ( | ) | const |
getScriptType
Definition at line 57 of file ScriptWidget.cpp.
References m_fileName.
Referenced by te::ce::CodeEditorDialog::onRunButtonClicked(), open(), and save().
| void te::qt::widgets::ScriptWidget::open | ( | const QString & | fileName | ) |
Open the script file and presents it on the text edit.
| fileName | File name. |
Definition at line 73 of file ScriptWidget.cpp.
References file(), getScriptType(), te::qt::widgets::LexerFactory(), and m_fileName.
Referenced by te::ce::CodeEditorDialog::onOpenButtonClicked(), and MainWindow::open().
| void te::qt::widgets::ScriptWidget::save | ( | const QString & | fileName | ) |
Saves the content of the script into a file.
| fileName | Name of the file. |
Definition at line 100 of file ScriptWidget.cpp.
References file(), getScriptType(), te::qt::widgets::LexerFactory(), m_dirty, and m_fileName.
Referenced by MainWindow::save(), and te::ce::CodeEditorDialog::save().
| void te::qt::widgets::ScriptWidget::setDirty | ( | bool | dirty | ) |
Sets the status of the widget. True if the text was modified, false otherwise.
| dirty | Status to be set. |
Definition at line 134 of file ScriptWidget.cpp.
References m_dirty.
| void te::qt::widgets::ScriptWidget::setHighlightMode | ( | const QString & | mode | ) |
Sets the highlight mode for the script.
| mode | Name of the mode. |
Definition at line 129 of file ScriptWidget.cpp.
References te::qt::widgets::LexerFactory().
|
private |
Text was changed status.
Definition at line 128 of file ScriptWidget.h.
Referenced by save(), and setDirty().
|
private |
File name.
Definition at line 127 of file ScriptWidget.h.
Referenced by getScriptName(), getScriptType(), open(), and save().