qdesigner_internal::QDesignerLayoutDecorationFactory Class Reference

#include <default_layoutdecoration.h>

Inheritance diagram for qdesigner_internal::QDesignerLayoutDecorationFactory:

Inheritance graph
[legend]
Collaboration diagram for qdesigner_internal::QDesignerLayoutDecorationFactory:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 75 of file default_layoutdecoration.h.

Public Member Functions

 QDesignerLayoutDecorationFactory (QExtensionManager *parent=0)

Protected Member Functions

virtual QObjectcreateExtension (QObject *object, const QString &iid, QObject *parent) const


Constructor & Destructor Documentation

QDesignerLayoutDecorationFactory::QDesignerLayoutDecorationFactory ( QExtensionManager parent = 0  ) 

Definition at line 129 of file default_layoutdecoration.cpp.

00130     : QExtensionFactory(parent)
00131 {
00132 }


Member Function Documentation

QObject * QDesignerLayoutDecorationFactory::createExtension ( QObject object,
const QString iid,
QObject parent 
) const [protected, virtual]

Creates an extension specified by iid for the given object. The extension object is created as a child of the specified parent.

See also:
extension()

Reimplemented from QExtensionFactory.

Definition at line 134 of file default_layoutdecoration.cpp.

References qdesigner_internal::FormWindow::findFormWindow(), object, QObject::parent(), Q_TYPEID, and qobject_cast< QWidget * >().

00135 {
00136     if (iid != Q_TYPEID(QDesignerLayoutDecorationExtension))
00137         return 0;
00138 
00139     if (QLayoutWidget *widget = qobject_cast<QLayoutWidget*>(object)) {
00140         return new QDesignerLayoutDecoration(widget, parent);
00141     } else if (QWidget *widget = qobject_cast<QWidget*>(object)) {
00142         if (FormWindow *fw = FormWindow::findFormWindow(widget)) {
00143             QDesignerMetaDataBaseItemInterface *item = fw->core()->metaDataBase()->item(widget->layout());
00144             return item ? new QDesignerLayoutDecoration(fw, widget, parent) : 0;
00145         }
00146     }
00147 
00148     return 0;
00149 }

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Thu Mar 15 20:23:33 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1