Kexi API Documentation (2.0 alpha)

ScriptIO Class Reference

#include <scriptIO.h>

List of all members.


Detailed Description

A static class to deal with loading/saving events from/to XML.

Definition at line 39 of file scriptIO.h.

Static Public Member Functions

static bool saveFormEvents (QDomNode &parentNode, FormScript *script)
static bool loadFormEvents (QDomNode &parentNode, Form *form, ScriptManager *manager)
static bool saveAllEventsForWidget (QObject *widget, FormScript *fscript, QDomNode &node)
static void saveEvent (Event *event, QDomNode &parentNode)
static void saveEventList (EventList *list, QDomNode &parentNode)
static void loadEvent (QDomNode &node, EventList *list, Form *form)

Protected Member Functions

 ScriptIO ()
 ~ScriptIO ()


Constructor & Destructor Documentation

ScriptIO::ScriptIO  )  [inline, protected]
 

Definition at line 59 of file scriptIO.h.

ScriptIO::~ScriptIO  )  [inline, protected]
 

Definition at line 60 of file scriptIO.h.


Member Function Documentation

void ScriptIO::loadEvent QDomNode &  node,
EventList list,
Form form
[static]
 

Definition at line 156 of file scriptIO.cpp.

References EventList::addEvent(), KFormDesigner::Form::objectTree(), Event::setReceiver(), Event::setSender(), Event::setSignal(), Event::setSlot(), Event::setType(), Event::Slot, Event::UserFunction, and KFormDesigner::ObjectTreeItem::widget().

Referenced by loadFormEvents().

bool ScriptIO::loadFormEvents QDomNode &  parentNode,
Form form,
ScriptManager manager
[static]
 

Reads the <events> tag (parentNode), then creates and fills a FormScript object linked to this form. The new FormScript object is then added to ScriptManager list.

Definition at line 50 of file scriptIO.cpp.

References FormScript::eventList(), loadEvent(), FormScript::scriptContainer(), and FormScript::setCode().

bool ScriptIO::saveAllEventsForWidget QObject *  widget,
FormScript fscript,
QDomNode &  node
[static]
 

Save only the events related to widget name in the FormScript fscript. Used eg when copying/pasting widgets to keep also events related to it.

Definition at line 71 of file scriptIO.cpp.

References FormScript::eventList(), and saveEventList().

void ScriptIO::saveEvent Event event,
QDomNode &  parentNode
[static]
 

Definition at line 79 of file scriptIO.cpp.

References Event::Action, Event::receiver(), Event::sender(), Event::signal(), Event::slot(), Event::Slot, Event::type(), and Event::UserFunction.

Referenced by saveEventList().

void ScriptIO::saveEventList EventList list,
QDomNode &  parentNode
[static]
 

Definition at line 141 of file scriptIO.cpp.

References saveEvent().

Referenced by saveAllEventsForWidget(), and saveFormEvents().

bool ScriptIO::saveFormEvents QDomNode &  parentNode,
FormScript script
[static]
 

Save the evnts of a form. Creates an <events> tag, and then one <event> tag for each event. Each event contains <sender> and <receiver> tags, with attributes depending on event type.

Definition at line 30 of file scriptIO.cpp.

References FormScript::eventList(), FormScript::getCode(), saveEventList(), and FormScript::scriptContainer().


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:23 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003