[][src]Struct qt_widgets::QItemEditorFactory

#[repr(C)]pub struct QItemEditorFactory { /* fields omitted */ }

The QItemEditorFactory class provides widgets for editing item data in views and delegates.

C++ class: QItemEditorFactory.

C++ documentation:

The QItemEditorFactory class provides widgets for editing item data in views and delegates.

When editing data in an item view, editors are created and displayed by a delegate. QItemDelegate, which is the delegate by default installed on Qt's item views, uses a QItemEditorFactory to create editors for it. A default unique instance provided by QItemEditorFactory is used by all item delegates. If you set a new default factory with setDefaultFactory(), the new factory will be used by existing and new delegates.

A factory keeps a collection of QItemEditorCreatorBase instances, which are specialized editors that produce editors for one particular QVariant data type (All Qt models store their data in QVariants).

Methods

impl QItemEditorFactory[src]

pub unsafe fn copy_from(
    &self,
    other: impl CastInto<Ref<QItemEditorFactory>>
) -> Ref<QItemEditorFactory>
[src]

The QItemEditorFactory class provides widgets for editing item data in views and delegates.

Calls C++ function: QItemEditorFactory& QItemEditorFactory::operator=(const QItemEditorFactory& other).

C++ documentation:

The QItemEditorFactory class provides widgets for editing item data in views and delegates.

When editing data in an item view, editors are created and displayed by a delegate. QItemDelegate, which is the delegate by default installed on Qt's item views, uses a QItemEditorFactory to create editors for it. A default unique instance provided by QItemEditorFactory is used by all item delegates. If you set a new default factory with setDefaultFactory(), the new factory will be used by existing and new delegates.

A factory keeps a collection of QItemEditorCreatorBase instances, which are specialized editors that produce editors for one particular QVariant data type (All Qt models store their data in QVariants).

pub unsafe fn create_editor(
    &self,
    user_type: c_int,
    parent: impl CastInto<Ptr<QWidget>>
) -> QPtr<QWidget>
[src]

Creates an editor widget with the given parent for the specified userType of data, and returns it as a QWidget.

Calls C++ function: virtual QWidget* QItemEditorFactory::createEditor(int userType, QWidget* parent) const.

C++ documentation:

Creates an editor widget with the given parent for the specified userType of data, and returns it as a QWidget.

See also registerEditor().

pub unsafe fn default_factory() -> Ptr<QItemEditorFactory>[src]

Returns the default item editor factory.

Calls C++ function: static const QItemEditorFactory* QItemEditorFactory::defaultFactory().

C++ documentation:

Returns the default item editor factory.

See also setDefaultFactory().

pub unsafe fn new() -> CppBox<QItemEditorFactory>[src]

Constructs a new item editor factory.

Calls C++ function: [constructor] void QItemEditorFactory::QItemEditorFactory().

C++ documentation:

Constructs a new item editor factory.

pub unsafe fn new_copy(
    other: impl CastInto<Ref<QItemEditorFactory>>
) -> CppBox<QItemEditorFactory>
[src]

The QItemEditorFactory class provides widgets for editing item data in views and delegates.

Calls C++ function: [constructor] void QItemEditorFactory::QItemEditorFactory(const QItemEditorFactory& other).

C++ documentation:

The QItemEditorFactory class provides widgets for editing item data in views and delegates.

When editing data in an item view, editors are created and displayed by a delegate. QItemDelegate, which is the delegate by default installed on Qt's item views, uses a QItemEditorFactory to create editors for it. A default unique instance provided by QItemEditorFactory is used by all item delegates. If you set a new default factory with setDefaultFactory(), the new factory will be used by existing and new delegates.

A factory keeps a collection of QItemEditorCreatorBase instances, which are specialized editors that produce editors for one particular QVariant data type (All Qt models store their data in QVariants).

pub unsafe fn register_editor(
    &self,
    user_type: c_int,
    creator: impl CastInto<Ptr<QItemEditorCreatorBase>>
)
[src]

Registers an item editor creator specified by creator for the given userType of data.

Calls C++ function: void QItemEditorFactory::registerEditor(int userType, QItemEditorCreatorBase* creator).

C++ documentation:

Registers an item editor creator specified by creator for the given userType of data.

Note: The factory takes ownership of the item editor creator and will destroy it if a new creator for the same type is registered later.

See also createEditor().

pub unsafe fn set_default_factory(
    factory: impl CastInto<Ptr<QItemEditorFactory>>
)
[src]

Sets the default item editor factory to the given factory. Both new and existing delegates will use the new factory.

Calls C++ function: static void QItemEditorFactory::setDefaultFactory(QItemEditorFactory* factory).

C++ documentation:

Sets the default item editor factory to the given factory. Both new and existing delegates will use the new factory.

See also defaultFactory().

pub unsafe fn value_property_name(&self, user_type: c_int) -> CppBox<QByteArray>[src]

Returns the property name used to access data for the given userType of data.

Calls C++ function: virtual QByteArray QItemEditorFactory::valuePropertyName(int userType) const.

C++ documentation:

Returns the property name used to access data for the given userType of data.

Trait Implementations

impl CppDeletable for QItemEditorFactory[src]

unsafe fn delete(&self)[src]

Destroys the item editor factory.

Calls C++ function: virtual [destructor] void QItemEditorFactory::~QItemEditorFactory().

C++ documentation:

Destroys the item editor factory.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.