Kexi API Documentation (2.0 alpha)

FormScript Class Reference

#include <formscript.h>

List of all members.


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)
 ~FormScript ()
EventListeventList ()
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 ()


Constructor & Destructor Documentation

FormScript::FormScript Form form,
ScriptManager manager,
const char *  name = 0
 

Definition at line 34 of file formscript.cpp.

References ScriptManager::krossManager(), and KFormDesigner::Form::widget().

FormScript::~FormScript  ) 
 

Definition at line 40 of file formscript.cpp.


Member Function Documentation

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.

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.

Definition at line 81 of file formscript.cpp.

References Event::Action, EventList::constBegin(), EventList::constEnd(), KFormDesigner::Form::objectTree(), Event::Slot, Event::UserFunction, and KFormDesigner::Form::widget().

EventList* FormScript::eventList  )  [inline]
 

Definition at line 52 of file formscript.h.

Referenced by ScriptIO::loadFormEvents(), ScriptIO::saveAllEventsForWidget(), and ScriptIO::saveFormEvents().

bool FormScript::execute const QString functionName  ) 
 

Executes the functionName.

Todo:
how do we give parameters?

Definition at line 67 of file formscript.cpp.

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.

Definition at line 45 of file formscript.cpp.

Referenced by ScriptIO::saveFormEvents().

Kross::Api::ScriptContainer* FormScript::scriptContainer  )  [inline]
 

Definition at line 53 of file formscript.h.

Referenced by ScriptIO::loadFormEvents(), and ScriptIO::saveFormEvents().

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.

Referenced by ScriptIO::loadFormEvents().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:50:02 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003