Kexi API Documentation (2.0 alpha)

KFormDesigner::ObjectTreeItem Class Reference

#include <objecttree.h>

Inheritance diagram for KFormDesigner::ObjectTreeItem:

KFormDesigner::ObjectTree List of all members.

Detailed Description

An item representing a widget Holds the properties of a widget (classname, name, parent, children ..).

Author:
Lucijan Busch <lucijan@kde.org>

Definition at line 64 of file objecttree.h.

Public Member Functions

 ObjectTreeItem (const QString &className, const QString &name, QWidget *widget, Container *parentContainer, Container *container=0)
virtual ~ObjectTreeItem ()
QString name () const
QString className () const
QWidgetwidget () const
EventEatereventEater () const
ObjectTreeItemparent () const
ObjectTreeListchildren ()
const QVariantMapmodifiedProperties () const
Containercontainer () const
void setWidget (QWidget *w)
void setParent (ObjectTreeItem *parent)
void debug (int ident)
void rename (const QString &name)
void addChild (ObjectTreeItem *it)
void removeChild (ObjectTreeItem *it)
void addModifiedProperty (const QCString &property, const QVariant &oldValue)
void storeUnknownProperty (QDomElement &el)
void addSubproperty (const QCString &property, const QVariant &value)
QMap< QString, QVariant > * subproperties () const
void setPixmapName (const QCString &property, const QString &name)
QString pixmapName (const QCString &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)

Protected Attributes

QString m_className
QString m_name
ObjectTreeList m_children
QGuardedPtr< Containerm_container
QMap< QString, QVariant > m_props
QMap< QString, QVariant > * m_subprops
QString m_unknownProps
QMap< QCString, QStringm_pixmapNames
ObjectTreeItemm_parent
QGuardedPtr< QWidgetm_widget
QGuardedPtr< EventEaterm_eater
bool m_enabled
int m_row
int m_col
int m_rowspan
int m_colspan
bool m_span

Friends

class ObjectTree
class FormIO


Constructor & Destructor Documentation

ObjectTreeItem::ObjectTreeItem const QString className,
const QString name,
QWidget widget,
Container parentContainer,
Container container = 0
 

Definition at line 39 of file objecttree.cpp.

References m_className, m_container, m_eater, m_name, m_parent, m_subprops, and m_widget.

ObjectTreeItem::~ObjectTreeItem  )  [virtual]
 

Definition at line 52 of file objecttree.cpp.

References m_subprops.


Member Function Documentation

void ObjectTreeItem::addChild ObjectTreeItem it  ) 
 

Definition at line 65 of file objecttree.cpp.

References m_children, and setParent().

Referenced by KFormDesigner::ObjectTree::addItem(), and KFormDesigner::ObjectTree::reparent().

void ObjectTreeItem::addModifiedProperty const QCString &  property,
const QVariant &  oldValue
 

Adds property in the list of the modified properties for this object. These modified properties are written in the .ui files when saving the form.

Definition at line 78 of file objecttree.cpp.

References m_props.

Referenced by KFormDesigner::WidgetPropertySet::createPropertyCommandsInDesignMode(), InsertPageCommand::execute(), ContainerFactory::readSpecialProperty(), KFormDesigner::WidgetPropertySet::saveAlignProperty(), KFormDesigner::WidgetPropertySet::saveLayoutProperty(), KFormDesigner::WidgetPropertySet::saveModifiedProperties(), KFormDesigner::WidgetPropertySet::slotPropertyChanged(), and KexiFormView::storeData().

void ObjectTreeItem::addSubproperty const QCString &  property,
const QVariant &  value
 

Adds subproperty property value value (a property of subwidget). Remembering it for delayed setting is needed because on loading the subwidget could be not created yet (true e.g. for KexiDBAutoField).

Definition at line 90 of file objecttree.cpp.

References m_subprops.

ObjectTreeList* KFormDesigner::ObjectTreeItem::children  )  [inline]
 

Definition at line 75 of file objecttree.h.

Referenced by KFormDesigner::Container::createBoxLayout(), KFormDesigner::Container::createFlowLayout(), KFormDesigner::Container::createGridLayout(), KFormDesigner::Container::drawSelectionRect(), KFormDesigner::AdjustSizeCommand::execute(), KFormDesigner::AdjustSizeCommand::getSizeFromChildren(), KFormDesigner::setRecursiveCursor(), KFormDesigner::ObjectTreeView::loadTree(), KFormDesigner::ObjectTree::removeItem(), ContainerFactory::reorderTabs(), KFormDesigner::FormIO::saveWidget(), and KFormDesigner::ObjectTree::~ObjectTree().

QString KFormDesigner::ObjectTreeItem::className  )  const [inline]
 

Definition at line 71 of file objecttree.h.

Referenced by KFormDesigner::FormIO::saveWidget().

Container* KFormDesigner::ObjectTreeItem::container  )  const [inline]
 

Returns:
the widget's Container, or 0if the widget is not a Container.

Definition at line 82 of file objecttree.h.

Referenced by KFormDesigner::Form::activeContainer(), KFormDesigner::FormManager::createLayout(), KFormDesigner::WidgetPropertySet::createPropertiesForWidget(), KFormDesigner::FormManager::emitWidgetSelected(), KFormDesigner::PasteWidgetCommand::execute(), KFormDesigner::CreateLayoutCommand::execute(), KFormDesigner::InsertWidgetCommand::execute(), KFormDesigner::AdjustSizeCommand::execute(), KFormDesigner::LayoutPropertyCommand::LayoutPropertyCommand(), KFormDesigner::WidgetPropertySet::saveLayoutProperty(), KFormDesigner::FormIO::saveWidget(), KFormDesigner::DeleteWidgetCommand::unexecute(), KFormDesigner::PasteWidgetCommand::unexecute(), KFormDesigner::CreateLayoutCommand::unexecute(), and KFormDesigner::LayoutPropertyCommand::unexecute().

void KFormDesigner::ObjectTreeItem::debug int  ident  ) 
 

EventEater* KFormDesigner::ObjectTreeItem::eventEater  )  const [inline]
 

Definition at line 73 of file objecttree.h.

Referenced by KFormDesigner::DesignTimeDynamicChildWidgetHandler::childWidgetAdded(), KFormDesigner::WidgetFactory::createEditor(), KFormDesigner::WidgetFactory::disableFilter(), KFormDesigner::CreateLayoutCommand::execute(), KFormDesigner::WidgetFactory::resetEditor(), KexiDBSubForm::setFormName(), and KFormDesigner::CreateLayoutCommand::unexecute().

int KFormDesigner::ObjectTreeItem::gridCol  )  const [inline]
 

Definition at line 115 of file objecttree.h.

Referenced by Spring::saveSpring(), and KFormDesigner::FormIO::saveWidget().

int KFormDesigner::ObjectTreeItem::gridColSpan  )  const [inline]
 

Definition at line 117 of file objecttree.h.

Referenced by Spring::saveSpring(), and KFormDesigner::FormIO::saveWidget().

int KFormDesigner::ObjectTreeItem::gridRow  )  const [inline]
 

Definition at line 114 of file objecttree.h.

Referenced by Spring::saveSpring(), and KFormDesigner::FormIO::saveWidget().

int KFormDesigner::ObjectTreeItem::gridRowSpan  )  const [inline]
 

Definition at line 116 of file objecttree.h.

Referenced by Spring::saveSpring(), and KFormDesigner::FormIO::saveWidget().

bool KFormDesigner::ObjectTreeItem::isEnabled  )  const [inline]
 

Definition at line 112 of file objecttree.h.

Referenced by KFormDesigner::WidgetPropertySet::createPropertiesForWidget(), KFormDesigner::WidgetFactory::disableFilter(), KFormDesigner::WidgetFactory::resetEditor(), and KFormDesigner::WidgetPropertySet::saveEnabledProperty().

const QVariantMap* KFormDesigner::ObjectTreeItem::modifiedProperties  )  const [inline]
 

Returns:
a QMap<QString, QVariant> of all modified properties for this widget. The QVariant is the old value (ie first value) of the property whose name is the QString.

Definition at line 79 of file objecttree.h.

Referenced by KFormDesigner::WidgetPropertySet::createPropertiesForWidget(), KFormDesigner::setRecursiveCursor(), ContainerFactory::previewWidget(), KFormDesigner::FormIO::saveWidget(), KFormDesigner::WidgetPropertySet::slotPropertyReset(), and KFormDesigner::WidgetPropertySet::updatePropertyValue().

QString KFormDesigner::ObjectTreeItem::name  )  const [inline]
 

Definition at line 70 of file objecttree.h.

Referenced by KFormDesigner::ObjectTree::addItem(), KFormDesigner::Form::autoAssignTabStops(), KFormDesigner::DeleteWidgetCommand::DeleteWidgetCommand(), KFormDesigner::Form::emitChildRemoved(), KFormDesigner::CreateLayoutCommand::execute(), KFormDesigner::ObjectTree::generateUniqueName(), KFormDesigner::LayoutPropertyCommand::LayoutPropertyCommand(), KFormDesigner::ObjectTree::lookup(), KFormDesigner::ObjectTreeViewItem::name(), KFormDesigner::ObjectTreeViewItem::paintCell(), KFormDesigner::ObjectTreeView::removeItem(), KFormDesigner::ObjectTree::removeItem(), KexiFormView::storeData(), and KFormDesigner::CreateLayoutCommand::unexecute().

ObjectTreeItem* KFormDesigner::ObjectTreeItem::parent  )  const [inline]
 

Definition at line 74 of file objecttree.h.

Referenced by KFormDesigner::Form::activeContainer(), KFormDesigner::ObjectTreeView::addItem(), KFormDesigner::CreateLayoutCommand::CreateLayoutCommand(), KFormDesigner::DeleteWidgetCommand::DeleteWidgetCommand(), KFormDesigner::Container::eventFilter(), KFormDesigner::FormManager::isTopLevel(), KFormDesigner::Form::parentContainer(), ContainerFactory::readSpecialProperty(), KFormDesigner::ObjectTree::removeItem(), KFormDesigner::ObjectTree::reparent(), and KFormDesigner::FormIO::saveWidget().

QString ObjectTreeItem::pixmapName const QCString &  property  ) 
 

Definition at line 113 of file objecttree.cpp.

References m_pixmapNames.

Referenced by KFormDesigner::FormIO::savePropertyValue(), and KFormDesigner::KFDPixmapEdit::selectPixmap().

void ObjectTreeItem::removeChild ObjectTreeItem it  ) 
 

Definition at line 72 of file objecttree.cpp.

References m_children.

void ObjectTreeItem::rename const QString name  ) 
 

Definition at line 59 of file objecttree.cpp.

References m_name.

Referenced by KFormDesigner::ObjectTree::rename().

void KFormDesigner::ObjectTreeItem::setEnabled bool  enabled  )  [inline]
 

Definition at line 111 of file objecttree.h.

Referenced by KFormDesigner::WidgetPropertySet::saveEnabledProperty().

void ObjectTreeItem::setGridPos int  row,
int  col,
int  rowspan,
int  colspan
 

Definition at line 121 of file objecttree.cpp.

References m_col, m_colspan, m_row, m_rowspan, and m_span.

Referenced by KFormDesigner::Container::createGridLayout(), and KFormDesigner::FormIO::loadWidget().

void KFormDesigner::ObjectTreeItem::setParent ObjectTreeItem parent  )  [inline]
 

Definition at line 85 of file objecttree.h.

Referenced by addChild().

void ObjectTreeItem::setPixmapName const QCString &  property,
const QString name
 

Definition at line 107 of file objecttree.cpp.

References m_pixmapNames.

Referenced by KFormDesigner::FormIO::readPropertyValue(), and KFormDesigner::KFDPixmapEdit::selectPixmap().

void KFormDesigner::ObjectTreeItem::setWidget QWidget w  )  [inline]
 

Definition at line 84 of file objecttree.h.

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

bool KFormDesigner::ObjectTreeItem::spanMultipleCells  )  const [inline]
 

Definition at line 118 of file objecttree.h.

Referenced by Spring::saveSpring(), and KFormDesigner::FormIO::saveWidget().

void ObjectTreeItem::storeUnknownProperty QDomElement &  el  ) 
 

Definition at line 98 of file objecttree.cpp.

References m_unknownProps.

QMap<QString, QVariant>* KFormDesigner::ObjectTreeItem::subproperties  )  const [inline]
 

Returns:
subproperties for this item, added by addSubproperty() or 0 is there are no subproperties.

Definition at line 106 of file objecttree.h.

QWidget* KFormDesigner::ObjectTreeItem::widget  )  const [inline]
 

Definition at line 72 of file objecttree.h.

Referenced by KFormDesigner::BreakLayoutCommand::BreakLayoutCommand(), KFormDesigner::FormManager::buddyChosen(), KFormDesigner::Container::createBoxLayout(), KFormDesigner::Container::createFlowLayout(), KFormDesigner::Container::createGridLayout(), KFormDesigner::FormIO::createToplevelWidget(), KFormDesigner::DeleteWidgetCommand::DeleteWidgetCommand(), KFormDesigner::Container::drawSelectionRect(), KFormDesigner::Container::eventFilter(), KFormDesigner::DeleteWidgetCommand::execute(), KFormDesigner::PasteWidgetCommand::execute(), KFormDesigner::CreateLayoutCommand::execute(), KFormDesigner::AdjustSizeCommand::execute(), KFormDesigner::AlignWidgetsCommand::execute(), KFormDesigner::GeometryPropertyCommand::execute(), KFormDesigner::PropertyCommand::execute(), KFormDesigner::AdjustSizeCommand::getSizeFromChildren(), KexiFormView::insertAutoFields(), KFormDesigner::LayoutPropertyCommand::LayoutPropertyCommand(), ScriptIO::loadEvent(), KFormDesigner::ObjectTreeViewItem::paintBranches(), KFormDesigner::ObjectTreeViewItem::paintCell(), Spring::saveSpring(), KFormDesigner::FormIO::saveWidget(), KFormDesigner::FormManager::selectAll(), KFormDesigner::Form::setDesignMode(), KFormDesigner::DeleteWidgetCommand::unexecute(), KFormDesigner::PasteWidgetCommand::unexecute(), KFormDesigner::CreateLayoutCommand::unexecute(), KFormDesigner::InsertWidgetCommand::unexecute(), KFormDesigner::LayoutPropertyCommand::unexecute(), KFormDesigner::AdjustSizeCommand::unexecute(), KFormDesigner::AlignWidgetsCommand::unexecute(), KFormDesigner::GeometryPropertyCommand::unexecute(), KFormDesigner::PropertyCommand::unexecute(), KFormDesigner::ConnectionDialog::updateSignalList(), KFormDesigner::ConnectionDialog::updateSlotList(), and KFormDesigner::Form::widget().


Friends And Related Function Documentation

friend class FormIO [friend]
 

Definition at line 140 of file objecttree.h.

friend class ObjectTree [friend]
 

Definition at line 139 of file objecttree.h.


Member Data Documentation

ObjectTreeList KFormDesigner::ObjectTreeItem::m_children [protected]
 

Definition at line 124 of file objecttree.h.

Referenced by addChild(), and removeChild().

QString KFormDesigner::ObjectTreeItem::m_className [protected]
 

Definition at line 122 of file objecttree.h.

Referenced by ObjectTreeItem().

int KFormDesigner::ObjectTreeItem::m_col [protected]
 

Definition at line 136 of file objecttree.h.

Referenced by setGridPos().

int KFormDesigner::ObjectTreeItem::m_colspan [protected]
 

Definition at line 136 of file objecttree.h.

Referenced by setGridPos().

QGuardedPtr<Container> KFormDesigner::ObjectTreeItem::m_container [protected]
 

Definition at line 125 of file objecttree.h.

Referenced by KFormDesigner::ObjectTree::addItem(), ObjectTreeItem(), and KFormDesigner::ObjectTree::removeItem().

QGuardedPtr<EventEater> KFormDesigner::ObjectTreeItem::m_eater [protected]
 

Definition at line 132 of file objecttree.h.

Referenced by ObjectTreeItem().

bool KFormDesigner::ObjectTreeItem::m_enabled [protected]
 

Definition at line 134 of file objecttree.h.

QString KFormDesigner::ObjectTreeItem::m_name [protected]
 

Definition at line 123 of file objecttree.h.

Referenced by ObjectTreeItem(), KFormDesigner::ObjectTree::rename(), and rename().

ObjectTreeItem* KFormDesigner::ObjectTreeItem::m_parent [protected]
 

Definition at line 130 of file objecttree.h.

Referenced by ObjectTreeItem().

QMap<QCString, QString> KFormDesigner::ObjectTreeItem::m_pixmapNames [protected]
 

Definition at line 129 of file objecttree.h.

Referenced by pixmapName(), and setPixmapName().

QMap<QString, QVariant> KFormDesigner::ObjectTreeItem::m_props [protected]
 

Definition at line 126 of file objecttree.h.

Referenced by addModifiedProperty().

int KFormDesigner::ObjectTreeItem::m_row [protected]
 

Definition at line 136 of file objecttree.h.

Referenced by setGridPos().

int KFormDesigner::ObjectTreeItem::m_rowspan [protected]
 

Definition at line 136 of file objecttree.h.

Referenced by setGridPos().

bool KFormDesigner::ObjectTreeItem::m_span [protected]
 

Definition at line 137 of file objecttree.h.

Referenced by setGridPos().

QMap<QString, QVariant>* KFormDesigner::ObjectTreeItem::m_subprops [protected]
 

Definition at line 127 of file objecttree.h.

Referenced by addSubproperty(), ObjectTreeItem(), and ~ObjectTreeItem().

QString KFormDesigner::ObjectTreeItem::m_unknownProps [protected]
 

Definition at line 128 of file objecttree.h.

Referenced by KFormDesigner::FormIO::saveWidget(), and storeUnknownProperty().

QGuardedPtr<QWidget> KFormDesigner::ObjectTreeItem::m_widget [protected]
 

Definition at line 131 of file objecttree.h.

Referenced by ObjectTreeItem().


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