KLChildMeta Class Reference

[KLE Index] [KLE Hierarchy] [Headers]


This is the baseclass for all metaclasses in the KLE It describes all things important for a GUI designer and for serialising More...

#include <klelib/klchildmeta.h>

Public Members


Detailed Description

This is the baseclass for all metaclasses in the KLE

It describes all things important for a GUI designer and for serialising


KLChildMeta() [public]

Constructor/Destructor

KLChildMeta *parentMeta[public]

Metaclass of the parent class

QString className[public]

Unique Class Name

This can be: - A buildin name (e.g. "KLLineEdit") - A named instance of an existing class: Syntax "clone:className#Name". This is used, when you autoedit an existing layout - A URL-Name of a shared lib class (e.g. "file:/opt/kde/shared/controls/hypergigangitg.ctrl") (not yet) - A Application URL (e.g. "app:/superdebugger/stack/backtracelistbox") (not yet) - At the first step, such controls can only be in one application - (Perhaps) later this will change, so that you could import such controls from other applications. (Would be directly using CORBA be a better model -- Would it make this possible ?)

QString userClassName[public]

User Class Name

The name, under wich the user will see the control (will also be translated)

QString displayPath[public]

Tree display path ("/" sepearated) (in the GUI editor "avail widget tree") If no displaypath is specified, the Class is not displayed. This is also the default

You may change the path of exiting metaclass to fit in your controltree.

This path is only for displaying the widget tree. So changing it will perhaps only currupt the widget tree.

enum ClassType ( StandAlone, FixUnique, Multiple ) [public]

Class types

- StandAlone: Objects of this class don't need a specific application environment. (e.g. a command execute button, a label or a image, also HVGroups and GridGroups) - FixUnique: This metaclass was created by autoedit with an existing object. It depends where much on a existing applicaton envirnoment. The object should never be delete inside the KLE! It can only be displayed one time. (Because it is not possible to recreate the object) - Multiple: Objects of this class can exists as many as you want. There setup there environment (connect()-ions, etc) thereself. They all display the same data. If you change the data in one object, there will/must be synced with all other existing objects of this class.

ClassType classType() const [public virtual]

Get the classtype of this class.

KLChild* createObject(void *envinfo) const [public virtual]

Creates an empty object of this class

Parameters:
envinfo Application depending environment information

KLChild* createObjectEdit(KLChild *object, bool extended=false) const [public virtual]

Create the object edit

First call createObjectEdit() of KLChildMeta. It will create a KLGridGroup with 2 coloums for you, and insert its edits. Then you should add your edits. Note: The first coloum should be a description. If you don't have a description (e.g. when you have a checkbox), insert a HVSpace() for the description, so that the checkbox would be in the second coloumn.

Note that you can change this behavor.E.g. if you want to display tabctrls. In this case you should e.g. insert the baseclass settings as one page. But please documentate this, so that derivided classes knows how they must insert there additional edits.

If extended is false, than you should not display very "danguras" or complex options (e.g. when specifing false when calling createObjectEdit() of the KLChild-Metaclass, there will be now fixXSize and fixYSize edits).

You must (of course) not call the baseclass, e.g. if you only want your special edits.

Parameters:
extended If true, create an extended edit
object Pointer to the object to create the edit for

bool dumpObject(KLChild *object, KLDumpDevice &stream) const [public virtual]

Dump the object (and all containted subobjects)

You have only to write the . DON`T write the nor . This will be done for you.

You donīt need to call the method of your supermetaclass.

Parameters:
stream Stream to dump on
object Object to dump
Returns:
true, if successfull dumped.
See Also:
restoreObject

void restoreObject(KLChild *object, KLDumpDevice &stream) const [public virtual]

Restore the object (and all contained subobjects)

Read your data from the stream.

IMPORTANT NOTE: You must make sure yourself, that you not read too much data from the stream !! (Which you perhaps will not need)

You donīt need to call the method of your supermetaclass.

Parameters:
stream Stream to restore the object from
object Object to restore

bool dumpCompleteObject(KLChild *object, KLDumpDevice &stream) [public static]

Completly dump this object. This means, that the dumpObject method of this metaClass is called and of all parent metaclasses.

Parameters:
stream Stream to dump the object into
object Object to dump
See Also:
dumpObject

KLChild* restoreCompleteObject( KLDumpDevice &stream, KLChild *object = 0) [public static]

Completly restore this object. This means, that it will create the object and than call the restoreObject() methods of all metaclasses.

If you give a object as paramter, it will use this object and not create a new one. It will also HASSERT the same metaclass !

Assumes this on the stream:

{ ClassName

}

Parameters:
stream Stream to restore the object from
object If not 0, object to restore the data in

Documentation generated by emmy@gate on Tue Sep 22 21:13:27 MEST 1998
Kdoc