Manages scripts for the application.
More...
#include <ScriptManager.h>
|
| | ScriptManager (QSettings *settings, QObject *parent) |
| | Constructor.
|
| |
| | ~ScriptManager () override |
| | Overridden destructor.
|
| |
| QString | getScriptFilePath (const QString &base_name=QString()) const |
| | Gets the full file path of a script name passed.
|
| |
| void | shortcutActivated (ScriptEntry *entry) |
| | Gets called from an entry when a shortcut is activated.
|
| |
| void | storeSettings (bool save) |
| | Saves and restores the entries from settings.
|
| |
| bool | isModified () const |
| | Gets status whether to save to settings is needed.
|
| |
| void | addAt (qsizetype index=-1) |
| | Adds and empty entry to the list.
|
| |
| void | remove (qsizetype index) |
| | Removes an entry in the list.
|
| |
| void | start (qsizetype index=-1) |
| | Compiles and initializes script at passed position or all scripts when passing -1.
|
| |
| void | stop (qsizetype index=-1) |
| | Stops script at passed position or all scripts when passing -1.
|
| |
| ScriptEntry * | getEntry (qsizetype index) |
| | Gets the entry from the list by index.
|
| |
| void | setModified (QObject *caller) |
| | Sets the modified flag and notifies ...
|
| |
| const ScriptEntry * | getEntryByFilepath (const QString &filepath) |
| | Gets the entry pointer form the passed absolute file path.
|
| |
|
| static QString | getFileSuffix () |
| | Gets the file extension used for scripts.
|
| |
Manages scripts for the application.
◆ ScriptManager()
| sf::ScriptManager::ScriptManager |
( |
QSettings * |
settings, |
|
|
QObject * |
parent |
|
) |
| |
|
explicit |
◆ ~ScriptManager()
| sf::ScriptManager::~ScriptManager |
( |
| ) |
|
|
override |
◆ addAt()
| void sf::ScriptManager::addAt |
( |
qsizetype |
index = -1 | ) |
|
Adds and empty entry to the list.
◆ getEntry()
| ScriptEntry * sf::ScriptManager::getEntry |
( |
qsizetype |
index | ) |
|
Gets the entry from the list by index.
◆ getEntryByFilepath()
| const ScriptEntry * sf::ScriptManager::getEntryByFilepath |
( |
const QString & |
filepath | ) |
|
Gets the entry pointer form the passed absolute file path.
◆ getFileSuffix()
| static QString sf::ScriptManager::getFileSuffix |
( |
| ) |
|
|
static |
Gets the file extension used for scripts.
◆ getScriptFilePath()
| QString sf::ScriptManager::getScriptFilePath |
( |
const QString & |
base_name = QString() | ) |
const |
Gets the full file path of a script name passed.
- Parameters
-
| base_name | Base name of the file without extension. |
- Returns
- Full filepath.
◆ isModified()
| bool sf::ScriptManager::isModified |
( |
| ) |
const |
Gets status whether to save to settings is needed.
◆ remove()
| void sf::ScriptManager::remove |
( |
qsizetype |
index | ) |
|
Removes an entry in the list.
◆ setModified()
| void sf::ScriptManager::setModified |
( |
QObject * |
caller | ) |
|
Sets the modified flag and notifies ...
◆ shortcutActivated()
| void sf::ScriptManager::shortcutActivated |
( |
ScriptEntry * |
entry | ) |
|
Gets called from an entry when a shortcut is activated.
- Parameters
-
◆ start()
| void sf::ScriptManager::start |
( |
qsizetype |
index = -1 | ) |
|
Compiles and initializes script at passed position or all scripts when passing -1.
◆ stop()
| void sf::ScriptManager::stop |
( |
qsizetype |
index = -1 | ) |
|
Stops script at passed position or all scripts when passing -1.
◆ storeSettings()
| void sf::ScriptManager::storeSettings |
( |
bool |
save | ) |
|
Saves and restores the entries from settings.
The documentation for this class was generated from the following file: