kexi
FormScript Class Reference
#include <formscript.h>
Inherits QObject.
Detailed Description
A class that stores the code and events related to a single form.Definition at line 44 of file formscript.h.
Public Member Functions | |
FormScript (Form *form, ScriptManager *manager, const char *name=0) | |
EventList * | eventList () |
Kross::Api::ScriptContainer * | scriptContainer () |
QString | getCode (const QString &functionName=QString::null) |
void | setCode (const QString &code) |
void | appendCode (const QString &code) |
bool | execute (const QString &functionName) |
void | connectEvents () |
Member Function Documentation
QString FormScript::getCode | ( | const QString & | functionName = QString::null |
) |
- Returns:
- The code of funtionName. If parameter is empty, it returns the full code of this form.
- Todo:
- Allow to select only one function
Definition at line 45 of file formscript.cpp.
void FormScript::setCode | ( | const QString & | code | ) |
Replaces the actual form code with the string code. Called eg by (future) script editor.
Definition at line 52 of file formscript.cpp.
void FormScript::appendCode | ( | const QString & | code | ) |
Adds the string code at the end of current code. Used to add a function in the script.
Definition at line 58 of file formscript.cpp.
bool FormScript::execute | ( | const QString & | functionName | ) |
Executes the functionName.
- Todo:
- how do we give parameters?
- Todo:
- support return value and arguments
Definition at line 67 of file formscript.cpp.
void FormScript::connectEvents | ( | ) |
Really connects all events in the list. Also calls Kross;;Api::Manager::addObject for each widget in the form to allow the user to use these widgets in the script.
- Todo:
- connect signals with actions
Definition at line 81 of file formscript.cpp.
The documentation for this class was generated from the following files: