kexi

KFormDesigner::ObjectTree Class Reference

#include <objecttree.h>

Inheritance diagram for KFormDesigner::ObjectTree:
KFormDesigner::ObjectTreeItem

Public Member Functions

 ObjectTree (const TQString &className=TQString(), const TQString &name=TQString(), TQWidget *widget=0, Container *container=0)
bool rename (const TQString &oldname, const TQString &newname)
bool reparent (const TQString &name, const TQString &newparent)
ObjectTreeItem * lookup (const TQString &name)
ObjectTreeDict * dict ()
void addItem (ObjectTreeItem *parent, ObjectTreeItem *c)
void removeItem (const TQString &name)
void removeItem (ObjectTreeItem *c)
TQCString generateUniqueName (const TQCString &prefix, bool numberSuffixRequired=true)
Public Member Functions inherited from KFormDesigner::ObjectTreeItem
 ObjectTreeItem (const TQString &className, const TQString &name, TQWidget *widget, Container *parentContainer, Container *container=0)
TQString name () const
TQString className () const
TQWidget * widget () const
EventEater * eventEater () const
ObjectTreeItem * parent () const
ObjectTreeList * children ()
const TQStringVariantMap * modifiedProperties () const
Container * container () const
void setWidget (TQWidget *w)
void setParent (ObjectTreeItem *parent)
void debug (int ident)
void rename (const TQString &name)
void addChild (ObjectTreeItem *it)
void removeChild (ObjectTreeItem *it)
void addModifiedProperty (const TQCString &property, const TQVariant &oldValue)
void storeUnknownProperty (TQDomElement &el)
void addSubproperty (const TQCString &property, const TQVariant &value)
TQStringVariantMap * subproperties () const
void setPixmapName (const TQCString &property, const TQString &name)
TQString pixmapName (const TQCString &property)
void setEnabled (bool enabled)
bool isEnabled () const
int gridRow () const
int gridCol () const
int gridRowSpan () const
int gridColSpan () const
bool spanMultipleCells () const
void setGridPos (int row, int col, int rowspan, int colspan)

Additional Inherited Members

Protected Attributes inherited from KFormDesigner::ObjectTreeItem
TQString m_className
TQString m_name
ObjectTreeList m_children
TQGuardedPtr< Container > m_container
TQStringVariantMap m_props
TQStringVariantMap * m_subprops
TQString m_unknownProps
TQMap< TQCString, TQString > m_pixmapNames
ObjectTreeItem * m_parent
TQGuardedPtr< TQWidget > m_widget
TQGuardedPtr< EventEater > m_eater
bool m_enabled
int m_row
int m_col
int m_rowspan
int m_colspan
bool m_span

Detailed Description

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

Definition at line 139 of file objecttree.h.

Constructor & Destructor Documentation

◆ ObjectTree()

ObjectTree::ObjectTree ( const TQString & className = TQString(),
const TQString & name = TQString(),
TQWidget * widget = 0,
Container * container = 0 )

ObjectTree /////////.

Definition at line 137 of file objecttree.cpp.

◆ ~ObjectTree()

ObjectTree::~ObjectTree ( )
virtual

Definition at line 142 of file objecttree.cpp.

Member Function Documentation

◆ addItem()

void ObjectTree::addItem ( ObjectTreeItem * parent,
ObjectTreeItem * c )

Definition at line 194 of file objecttree.cpp.

◆ dict()

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 157 of file objecttree.h.

◆ generateUniqueName()

TQCString ObjectTree::generateUniqueName ( const TQCString & 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.

◆ lookup()

ObjectTreeItem * ObjectTree::lookup ( const TQString & name)
Returns
the ObjectTreeItem named name, or 0 if doesn't exist.

Definition at line 185 of file objecttree.cpp.

◆ removeItem() [1/2]

void ObjectTree::removeItem ( const TQString & name)

Definition at line 207 of file objecttree.cpp.

◆ removeItem() [2/2]

void ObjectTree::removeItem ( ObjectTreeItem * c)

Definition at line 214 of file objecttree.cpp.

◆ rename()

bool ObjectTree::rename ( const TQString & oldname,
const TQString & 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.

◆ reparent()

bool ObjectTree::reparent ( const TQString & name,
const TQString & newparent )

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

Definition at line 172 of file objecttree.cpp.


The documentation for this class was generated from the following files: