Kexi API Documentation (2.0 alpha)

KFormDesigner::InsertWidgetCommand Class Reference

#include <commands.h>

Inheritance diagram for KFormDesigner::InsertWidgetCommand:

KFormDesigner::Command KCommand List of all members.

Detailed Description

This command is used when inserting a widger using toolbar or menu. You only need to give the parent Container and the widget pos. The other information is taken from FormManager.

Definition at line 174 of file commands.h.

Public Member Functions

 InsertWidgetCommand (Container *container)
 InsertWidgetCommand (Container *container, const QCString &className, const QPoint &pos, const QCString &namePrefix=QCString())
virtual void execute ()
virtual void unexecute ()
virtual QString name () const
virtual void debug ()
QCString widgetName () const

Protected Attributes

Formm_form
QString m_containername
QPoint m_point
QCString m_name
QCString m_class
QRect m_insertRect


Constructor & Destructor Documentation

InsertWidgetCommand::InsertWidgetCommand Container container  ) 
 

numberSuffixRequired

Definition at line 670 of file commands.cpp.

References KFormDesigner::Container::form(), m_class, m_containername, m_form, KFormDesigner::Container::m_insertBegin, KFormDesigner::Container::m_insertRect, m_insertRect, m_name, m_point, KFormDesigner::FormManager::self(), and KFormDesigner::Container::widget().

InsertWidgetCommand::InsertWidgetCommand Container container,
const QCString &  className,
const QPoint &  pos,
const QCString &  namePrefix = QCString()
 

This ctor allows to set explicit class name and position. Used for dropping widgets on the form surface. If namePrefix is empty, widget's unique name is constructed using hint for className (WidgetLibrary::namePrefix()), otherwise, namePrefix is used to generate widget's name. This allows e.g. inserting a widgets having name constructed using

Definition at line 683 of file commands.cpp.

References m_class, m_containername, m_form, m_name, and m_point.


Member Function Documentation

void InsertWidgetCommand::debug  )  [virtual]
 

Implements KFormDesigner::Command.

Definition at line 839 of file commands.cpp.

References m_class, m_containername, m_form, m_insertRect, m_name, m_point, name(), and KFormDesigner::Form::widget().

void InsertWidgetCommand::execute  )  [virtual]
 

Todo:
allow setting this for data view mode as well
Todo:
update widget's width for entered text's metrics

Definition at line 703 of file commands.cpp.

References KFormDesigner::WidgetFactory::AnyOrientation, KFormDesigner::ObjectTreeItem::container(), KFormDesigner::Form::designMode(), KFormDesigner::WidgetFactory::DesignViewMode, KFormDesigner::Container::form(), KFormDesigner::WidgetFactory::HorizontalOrientation, m_class, KFormDesigner::Container::m_container, m_containername, m_form, m_insertRect, m_name, m_point, KFormDesigner::Container::m_tree, KFormDesigner::WidgetInfo::name(), KFormDesigner::Form::objectTree(), options, KFormDesigner::Container::reloadLayout(), KFormDesigner::FormManager::self(), KFormDesigner::Container::setSelectedWidget(), KFormDesigner::WidgetFactory::VerticalOrientation, and KFormDesigner::Container::widget().

Referenced by KexiFormView::insertAutoFields().

QString InsertWidgetCommand::name  )  const [virtual]
 

Definition at line 830 of file commands.cpp.

References m_name.

Referenced by debug().

void InsertWidgetCommand::unexecute  )  [virtual]
 

Definition at line 819 of file commands.cpp.

References KFormDesigner::Container::deleteWidget(), m_containername, m_form, m_name, KFormDesigner::Form::objectTree(), and KFormDesigner::ObjectTreeItem::widget().

QCString KFormDesigner::InsertWidgetCommand::widgetName  )  const [inline]
 

Returns:
inserted widget's name

Definition at line 195 of file commands.h.

Referenced by KexiFormView::insertAutoFields().


Member Data Documentation

QCString KFormDesigner::InsertWidgetCommand::m_class [protected]
 

Definition at line 202 of file commands.h.

Referenced by debug(), execute(), and InsertWidgetCommand().

QString KFormDesigner::InsertWidgetCommand::m_containername [protected]
 

Definition at line 199 of file commands.h.

Referenced by debug(), execute(), InsertWidgetCommand(), and unexecute().

Form* KFormDesigner::InsertWidgetCommand::m_form [protected]
 

Definition at line 198 of file commands.h.

Referenced by debug(), execute(), InsertWidgetCommand(), and unexecute().

QRect KFormDesigner::InsertWidgetCommand::m_insertRect [protected]
 

Definition at line 203 of file commands.h.

Referenced by debug(), execute(), and InsertWidgetCommand().

QCString KFormDesigner::InsertWidgetCommand::m_name [protected]
 

Definition at line 201 of file commands.h.

Referenced by debug(), execute(), InsertWidgetCommand(), name(), and unexecute().

QPoint KFormDesigner::InsertWidgetCommand::m_point [protected]
 

Definition at line 200 of file commands.h.

Referenced by debug(), execute(), and InsertWidgetCommand().


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