Kexi API Documentation (2.0 alpha)

KFormDesigner::ObjectTree Class Reference

#include <objecttree.h>

Inheritance diagram for KFormDesigner::ObjectTree:

KFormDesigner::ObjectTreeItem List of all members.

Detailed Description

Represents all the objects available within a form. This class holds ObjectTreeItem for each widget in a Form.

Definition at line 145 of file objecttree.h.

Public Member Functions

 ObjectTree (const QString &className=QString::null, const QString &name=QString::null, QWidget *widget=0, Container *container=0)
 ObjectTree /////////.
virtual ~ObjectTree ()
bool rename (const QString &oldname, const QString &newname)
bool reparent (const QString &name, const QString &newparent)
ObjectTreeItemlookup (const QString &name)
ObjectTreeDictdict ()
void addItem (ObjectTreeItem *parent, ObjectTreeItem *c)
void removeItem (const QString &name)
void removeItem (ObjectTreeItem *c)
QCString generateUniqueName (const QCString &prefix, bool numberSuffixRequired=true)


Constructor & Destructor Documentation

ObjectTree::ObjectTree const QString className = QString::null,
const QString name = QString::null,
QWidget widget = 0,
Container container = 0
 

ObjectTree /////////.

Definition at line 136 of file objecttree.cpp.

ObjectTree::~ObjectTree  )  [virtual]
 

Definition at line 141 of file objecttree.cpp.

References KFormDesigner::ObjectTreeItem::children(), and removeItem().


Member Function Documentation

void ObjectTree::addItem ObjectTreeItem parent,
ObjectTreeItem c
 

Definition at line 193 of file objecttree.cpp.

References KFormDesigner::ObjectTreeItem::addChild(), KFormDesigner::ObjectTreeItem::m_container, and KFormDesigner::ObjectTreeItem::name().

ObjectTreeDict* KFormDesigner::ObjectTree::dict  )  [inline]
 

Returns:
a dict containing all ObjectTreeItem in this ObjectTree. If you want to iterate on this dict, use ObjectTreeDictIterator.

Definition at line 163 of file objecttree.h.

Referenced by KFormDesigner::Form::setDesignMode().

QCString ObjectTree::generateUniqueName const QCString &  prefix,
bool  numberSuffixRequired = true
 

Generates a new, unique name for a new widget using prefix prefix (e.g. if prefix is "lineEdit", "lineEdit1" is returned). prefix must be a valid identifier. If numberSuffixRequired is true (the default) a number suffix is mandatory. If numberSuffixRequired is false and there's a widget prefix prefix, then prefix is returned (e.g. if prefix is "lineEdit", and "lineEdit" doesn't exist yet, "lineEdit" is returned).

Definition at line 227 of file objecttree.cpp.

References lookup(), and KFormDesigner::ObjectTreeItem::name().

ObjectTreeItem * ObjectTree::lookup const QString name  ) 
 

Returns:
the ObjectTreeItem named name, or 0 if doesn't exist.

Definition at line 184 of file objecttree.cpp.

References KFormDesigner::ObjectTreeItem::name().

Referenced by KFormDesigner::Form::activeContainer(), KFormDesigner::Form::autoAssignTabStops(), KFormDesigner::Form::commonParentContainer(), generateUniqueName(), KFormDesigner::Form::parentContainer(), removeItem(), rename(), and reparent().

void ObjectTree::removeItem ObjectTreeItem c  ) 
 

Definition at line 213 of file objecttree.cpp.

References KFormDesigner::ObjectTreeItem::children(), KFormDesigner::ObjectTreeItem::m_container, KFormDesigner::ObjectTreeItem::name(), KFormDesigner::ObjectTreeItem::parent(), and removeItem().

void ObjectTree::removeItem const QString name  ) 
 

Definition at line 206 of file objecttree.cpp.

References lookup().

Referenced by removeItem(), and ~ObjectTree().

bool ObjectTree::rename const QString oldname,
const QString newname
 

Renames the item named oldname to newname.

Returns:
false if widget named newname already exists and renaming failed.

Definition at line 151 of file objecttree.cpp.

References lookup(), KFormDesigner::ObjectTreeItem::m_name, and KFormDesigner::ObjectTreeItem::rename().

Referenced by KFormDesigner::Form::changeName().

bool ObjectTree::reparent const QString name,
const QString newparent
 

Sets newparent as new parent for the item whose name is name.

Definition at line 171 of file objecttree.cpp.

References KFormDesigner::ObjectTreeItem::addChild(), lookup(), and KFormDesigner::ObjectTreeItem::parent().


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