Class overview   Alphabetical list   Annotated list   Header Files   Member List  

StorageModule Class Reference


Module which takes care of serialization and exporting of WidgetInfo objects. More...

#include <storemdl.h>

List of all member functions.

Public Members

Private Members


Detailed Description

Module which takes care of serialization and exporting of WidgetInfo objects.

The StorageModule takes care of all serialization tasks in Ebuilder. It supports three public members: read, write and export. The write and export members take a WidgetInfo object as argument and write the content to disk in either a proprietary format or C++ code. The read member can reconstruct a WidgetInfo object from a file previously written to disk by the write member function.

This class uses a lexical analyser generated with flex to analyse the input.


Member Function Documentation

StorageModule::StorageModule(QObject *parent, const char *name)

Create a new StorageModule.

void StorageModule::export(WidgetInfo *info, const char *basename)

Export the information contained in the WidgetInfo structure to C++. Constructs a header file called hname and an implementation file called iname in the directory dir.

WidgetInfo* StorageModule::read(const char *fname)

Read a widget definition from file fname. This member function makes use of an external lexical analyser, generated with flex.

void StorageModule::write(WidgetInfo *info, const char *fname)

Write a widget definition to file fname.

See also: StorageModule::writeWidgetProps StorageModule::writeMemberFuncs StorageModule::writeMemberVars StorageModule::writeIncludes

QWidget* StorageModule::addWidget(QWidget *parent, const QString &type, const QString &name) [private]

Add a widget of type type to the widget pointed to by target. Give it name name. Used by StorageModule::read.

int StorageModule::setWidgetProperty(QWidget *target, const QString &key, const QString &val) [private]

Set the property of the widget target named key to val. This member checks if the properties are valid. Used by StorageModule::read.

Return values: 0 if any error occurs 1 if all is well

int StorageModule::setMemberFuncProperty(MemberFunction *target, const QString &key, const QString &val) [private]

Set property key of MemberFunction target to val. This member checks if the key is correct. Used by StorageModule::read.

Return values:

0 on any error 1 if all is well

int StorageModule::setMemberVarProperty(MemberVariable *target, const QString &key, const QString &val) [private]

Set property key of MemberVariable target to val. This member checks if the key is correct. Used by StorageModule::read.

Return values:

0 on any error 1 if all is well

int StorageModule::setIncludeProperty(IncludeFile *target, const QString &key, const QString &val) [private]

Set property key of IncludeFile target to val. This member checks if the key is correct. Used by StorageModule::read.

Return values:

0 on any error 1 if all is well

void StorageModule::push(QWidget *val) [private]

This member function is used to push widgets on the widget stack. This is neccesary for correct processing of recursive widget definitions.

QWidget *StorageModule::pop() [private]

This member function is used to pop widgets off the widget stack. This is neccesary for correct processing of recursive widget definitions.

void StorageModule::writeWidgetProps(QWidget *target, ofstream &fout) [private]

Write the properties of the widget target to output file stream fout. This member calls itself recursively to write the properties of all subwidgets of target to disk. Used by StorageModule::write.

void StorageModule::writeMemberFuncs(const QList<MemberFunction> &list, ofstream &fout) [private]

Writes all MemberFunction-s found in list to output file stream fout. Used by StorageModule::write.

void StorageModule::writeMemberVars(const QList<MemberVariable> &list, ofstream &fout) [private]

Writes all MemberVariables-s found in list to output file stream fout. Used by StorageModule::write.

void StorageModule::writeIncludes(const QList<IncludeFile> &list, ofstream &fout) [private]

Writes all IncludeFile-s found in list to output file stream fout. Used by StorageModule::write.

void StorageModule::exportWidgetProps(QWidget *target, ofstream &fout) [private]

Exports the properties of the widget /a target to the file stream /a fout. All properties are checked to see if they correspond to the default values for the current application style. If a match is found, the property is not exported.

int StorageModule::checkProperty(QWidget *target, const char *property) [private]

Checks the property property of target agains the default value.

Return values: 0 if the properties are the same 1 if the properties differ


Member Variable Documentation

QString StorageModule::type [private]

Variable for lexical analyser holding widget type

QString StorageModule::name [private]

Variable for lexical analyser holding widget name

QString StorageModule::key [private]

Variable for lexical analyser holding property name

QString StorageModule::value [private]

Variable for lexical analyser holding property value

int StorageModule::lineNumber [private]

Variable for lexical analyser holding the current line number

int StorageModule::level [private]

Variable for lexical analyser holding the current recursion depth

int StorageModule::sp [private]

Variable for lexical analyser holding the current stack depth

QWidget* StorageModule::stack[100] [private]

Variable for lexical analyser forming a widget stack for recursion


This file was generated from the following files:
Generated at 14:38, 1998/04/17 for Ebuilder by doxygen  written by Dimitri van Heesch, © 1997-1998