kexi
KFormDesigner::ObjectTree Class Reference
#include <objecttree.h>

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) | |
bool | rename (const QString &oldname, const QString &newname) |
bool | reparent (const QString &name, const QString &newparent) |
ObjectTreeItem * | lookup (const QString &name) |
ObjectTreeDict * | dict () |
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 | |||
) |
Member Function Documentation
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 152 of file objecttree.cpp.
bool ObjectTree::reparent | ( | const QString & | name, | |
const QString & | newparent | |||
) |
Sets newparent as new parent for the item whose name is name.
Definition at line 172 of file objecttree.cpp.
ObjectTreeItem * ObjectTree::lookup | ( | const QString & | name | ) |
- Returns:
- the ObjectTreeItem named name, or 0 if doesn't exist.
Definition at line 185 of file objecttree.cpp.
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.
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 228 of file objecttree.cpp.
The documentation for this class was generated from the following files: