Kexi API Documentation (2.0 alpha)

KFormDesigner::ObjectTreeView Class Reference

#include <objecttreeview.h>

Inheritance diagram for KFormDesigner::ObjectTreeView:

KListView List of all members.

Detailed Description

A graphical view of Form's ObjectTree. This is a KListView which represents an item for each widget in the form. The actually selected widget is written bold and selected. Clicking on a list item selects the corresponding widget in the Form.

Definition at line 67 of file objecttreeview.h.

Public Slots

void setSelectedWidget (QWidget *w, bool add=false)
void addItem (ObjectTreeItem *item)
void removeItem (ObjectTreeItem *item)
void renameItem (const QCString &oldname, const QCString &newname)

Public Member Functions

 ObjectTreeView (QWidget *parent=0, const char *name=0, bool tabStop=false)
virtual ~ObjectTreeView ()
virtual QSize sizeHint () const
void setForm (Form *form)
QString iconNameForClass (const QCString &classname)

Protected Slots

void displayContextMenu (KListView *list, QListViewItem *item, const QPoint &p)
void slotColumnSizeChanged (int)
void slotSelectionChanged ()
void slotBeforeFormDestroyed ()

Protected Member Functions

ObjectTreeViewItemloadTree (ObjectTreeItem *item, ObjectTreeViewItem *parent)
 Internal function to fill the list.
ObjectTreeViewItemfindItem (const QString &name)

Friends

class TabStopDialog


Constructor & Destructor Documentation

ObjectTreeView::ObjectTreeView QWidget parent = 0,
const char *  name = 0,
bool  tabStop = false
 

Definition at line 166 of file objecttreeview.cpp.

References addColumn(), displayContextMenu(), slotColumnSizeChanged(), and slotSelectionChanged().

ObjectTreeView::~ObjectTreeView  )  [virtual]
 

Definition at line 189 of file objecttreeview.cpp.


Member Function Documentation

void ObjectTreeView::addItem ObjectTreeItem item  )  [slot]
 

Adds the ObjectTreeItem item in the list, with the appropriate parent.

Definition at line 291 of file objecttreeview.cpp.

References findItem(), loadTree(), and KFormDesigner::ObjectTreeItem::parent().

void ObjectTreeView::displayContextMenu KListView list,
QListViewItem item,
const QPoint &  p
[protected, slot]
 

This slot is called when the user right-click a list item. The widget context menu is shown, as inisde the Form.

Definition at line 213 of file objecttreeview.cpp.

References KFormDesigner::Form::activeContainer(), and KFormDesigner::FormManager::self().

Referenced by ObjectTreeView().

ObjectTreeViewItem * ObjectTreeView::findItem const QString name  )  [protected]
 

Returns:
The item whose name is name.

Definition at line 226 of file objecttreeview.cpp.

References KFormDesigner::ObjectTreeViewItem::name().

Referenced by addItem(), removeItem(), renameItem(), and setSelectedWidget().

QString ObjectTreeView::iconNameForClass const QCString &  classname  ) 
 

Returns:
the pixmap name for a given class, to be shown next to the widget name.

Definition at line 201 of file objecttreeview.cpp.

References KFormDesigner::Form::library().

ObjectTreeViewItem * ObjectTreeView::loadTree ObjectTreeItem item,
ObjectTreeViewItem parent
[protected]
 

Internal function to fill the list.

Definition at line 357 of file objecttreeview.cpp.

References KFormDesigner::ObjectTreeItem::children(), and KFormDesigner::ObjectTreeViewItem::setOpen().

Referenced by addItem(), and setForm().

void ObjectTreeView::removeItem ObjectTreeItem item  )  [slot]
 

Removess the ObjectTreeItem item from the list.

Definition at line 303 of file objecttreeview.cpp.

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

void ObjectTreeView::renameItem const QCString &  oldname,
const QCString &  newname
[slot]
 

Just renames the list item from oldname to newname.

Definition at line 312 of file objecttreeview.cpp.

References findItem().

void ObjectTreeView::setForm Form form  ) 
 

Sets form as the current Form in the list. The list will automatically be filled with an item for each widget in the Form, and selection will be synced. Nothing happens if form is already the current Form.

Definition at line 323 of file objecttreeview.cpp.

References loadTree(), KFormDesigner::ObjectTreeViewItem::setOpen(), setSelectedWidget(), and slotBeforeFormDestroyed().

Referenced by slotBeforeFormDestroyed().

void ObjectTreeView::setSelectedWidget QWidget w,
bool  add = false
[slot]
 

Sets the widget w as selected item, so it will be written bold. It is added to current selection if add is true.

Definition at line 242 of file objecttreeview.cpp.

References findItem().

Referenced by setForm().

QSize ObjectTreeView::sizeHint  )  const [virtual]
 

Definition at line 194 of file objecttreeview.cpp.

void ObjectTreeView::slotBeforeFormDestroyed  )  [protected, slot]
 

Called before Form object is destroyed.

Definition at line 351 of file objecttreeview.cpp.

References setForm().

Referenced by setForm().

void ObjectTreeView::slotColumnSizeChanged int   )  [protected, slot]
 

Definition at line 207 of file objecttreeview.cpp.

Referenced by ObjectTreeView().

void ObjectTreeView::slotSelectionChanged  )  [protected, slot]
 

The selected list item has changed, so we emit a signal to update the Form.

Definition at line 274 of file objecttreeview.cpp.

References KFormDesigner::ObjectTreeViewItem::objectTree(), KFormDesigner::Form::selectedWidgets(), KFormDesigner::Form::selectFormWidget(), and KFormDesigner::Form::setSelectedWidget().

Referenced by ObjectTreeView().


Friends And Related Function Documentation

friend class TabStopDialog [friend]
 

Definition at line 124 of file objecttreeview.h.


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