[][src]Struct qt_core::QConcatenateTablesProxyModel

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

QConcatenateTablesProxyModel takes multiple source models and concatenates their rows.

C++ class: QConcatenateTablesProxyModel.

C++ documentation:

QConcatenateTablesProxyModel takes multiple source models and concatenates their rows.

In other words, the proxy will have all rows of the first source model, followed by all rows of the second source model, and so on.

If the source models don't have the same number of columns, the proxy will only have as many columns as the source model with the smallest number of columns. Additional columns in other source models will simply be ignored.

Source models can be added and removed at runtime, and the column count is adjusted accordingly.

This proxy does not inherit from QAbstractProxyModel because it uses multiple source models, rather than a single one.

Only flat models (lists and tables) are supported, tree models are not.

Methods

impl QConcatenateTablesProxyModel[src]

pub unsafe fn add_source_model(
    &self,
    source_model: impl CastInto<Ptr<QAbstractItemModel>>
)
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Adds a source model sourceModel, below all previously added source models.

Calls C++ function: void QConcatenateTablesProxyModel::addSourceModel(QAbstractItemModel* sourceModel).

C++ documentation:

Adds a source model sourceModel, below all previously added source models.

The ownership of sourceModel is not affected by this.

The same source model cannot be added more than once.

pub unsafe fn can_drop_mime_data(
    &self,
    data: impl CastInto<Ptr<QMimeData>>,
    action: DropAction,
    row: c_int,
    column: c_int,
    parent: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const.

Calls C++ function: virtual bool QConcatenateTablesProxyModel::canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const.

C++ documentation:

Reimplements: QAbstractItemModel::canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const.

pub unsafe fn column_count_1a(
    &self,
    parent: impl CastInto<Ref<QModelIndex>>
) -> c_int
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::columnCount(const QModelIndex &parent) const.

Calls C++ function: virtual int QConcatenateTablesProxyModel::columnCount(const QModelIndex& parent = …) const.

C++ documentation:

Reimplements: QAbstractItemModel::columnCount(const QModelIndex &parent) const.

This method returns the column count of the source model with the smallest number of columns.

pub unsafe fn column_count_0a(&self) -> c_int[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::columnCount(const QModelIndex &parent) const.

Calls C++ function: virtual int QConcatenateTablesProxyModel::columnCount() const.

C++ documentation:

Reimplements: QAbstractItemModel::columnCount(const QModelIndex &parent) const.

This method returns the column count of the source model with the smallest number of columns.

pub unsafe fn data_2a(
    &self,
    index: impl CastInto<Ref<QModelIndex>>,
    role: c_int
) -> CppBox<QVariant>
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::data(const QModelIndex &index, int role) const.

Calls C++ function: virtual QVariant QConcatenateTablesProxyModel::data(const QModelIndex& index, int role = …) const.

C++ documentation:

Reimplements: QAbstractItemModel::data(const QModelIndex &index, int role) const.

See also setData().

pub unsafe fn data_1a(
    &self,
    index: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QVariant>
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::data(const QModelIndex &index, int role) const.

Calls C++ function: virtual QVariant QConcatenateTablesProxyModel::data(const QModelIndex& index) const.

C++ documentation:

Reimplements: QAbstractItemModel::data(const QModelIndex &index, int role) const.

See also setData().

pub unsafe fn drop_mime_data(
    &self,
    data: impl CastInto<Ptr<QMimeData>>,
    action: DropAction,
    row: c_int,
    column: c_int,
    parent: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent).

Calls C++ function: virtual bool QConcatenateTablesProxyModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent).

C++ documentation:

Reimplements: QAbstractItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent).

QConcatenateTablesProxyModel handles dropping onto an item, between items, and after the last item. In all cases the call is forwarded to the underlying source model. When dropping onto an item, the source model for this item is called. When dropping between items, the source model immediately below the drop position is called. When dropping after the last item, the last source model is called.

pub unsafe fn flags(
    &self,
    index: impl CastInto<Ref<QModelIndex>>
) -> QFlags<ItemFlag>
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::flags(const QModelIndex &index) const.

Calls C++ function: virtual QFlags<Qt::ItemFlag> QConcatenateTablesProxyModel::flags(const QModelIndex& index) const.

C++ documentation:

Reimplements: QAbstractItemModel::flags(const QModelIndex &index) const.

Returns the flags for the given index. If the index is valid, the flags come from the source model for this index. If the index is invalid (as used to determine if dropping onto an empty area in the view is allowed, for instance), the flags from the first model are returned.

pub unsafe fn header_data_3a(
    &self,
    section: c_int,
    orientation: Orientation,
    role: c_int
) -> CppBox<QVariant>
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::headerData(int section, Qt::Orientation orientation, int role) const.

Calls C++ function: virtual QVariant QConcatenateTablesProxyModel::headerData(int section, Qt::Orientation orientation, int role = …) const.

C++ documentation:

Reimplements: QAbstractItemModel::headerData(int section, Qt::Orientation orientation, int role) const.

This method returns the horizontal header data for the first source model, and the vertical header data for the source model corresponding to each row.

pub unsafe fn header_data_2a(
    &self,
    section: c_int,
    orientation: Orientation
) -> CppBox<QVariant>
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::headerData(int section, Qt::Orientation orientation, int role) const.

Calls C++ function: virtual QVariant QConcatenateTablesProxyModel::headerData(int section, Qt::Orientation orientation) const.

C++ documentation:

Reimplements: QAbstractItemModel::headerData(int section, Qt::Orientation orientation, int role) const.

This method returns the horizontal header data for the first source model, and the vertical header data for the source model corresponding to each row.

pub unsafe fn index_3a(
    &self,
    row: c_int,
    column: c_int,
    parent: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QModelIndex>
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::index(int row, int column, const QModelIndex &parent) const.

Calls C++ function: virtual QModelIndex QConcatenateTablesProxyModel::index(int row, int column, const QModelIndex& parent = …) const.

C++ documentation:

Reimplements: QAbstractItemModel::index(int row, int column, const QModelIndex &parent) const.

pub unsafe fn index_2a(&self, row: c_int, column: c_int) -> CppBox<QModelIndex>[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::index(int row, int column, const QModelIndex &parent) const.

Calls C++ function: virtual QModelIndex QConcatenateTablesProxyModel::index(int row, int column) const.

C++ documentation:

Reimplements: QAbstractItemModel::index(int row, int column, const QModelIndex &parent) const.

pub unsafe fn item_data(
    &self,
    proxy_index: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QMapOfIntQVariant>
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::itemData(const QModelIndex &index) const.

Calls C++ function: virtual QMap<int, QVariant> QConcatenateTablesProxyModel::itemData(const QModelIndex& proxyIndex) const.

C++ documentation:

Reimplements: QAbstractItemModel::itemData(const QModelIndex &index) const.

See also setItemData().

pub unsafe fn map_from_source(
    &self,
    source_index: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QModelIndex>
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Returns the proxy index for a given sourceIndex, which can be from any of the source models.

Calls C++ function: QModelIndex QConcatenateTablesProxyModel::mapFromSource(const QModelIndex& sourceIndex) const.

C++ documentation:

Returns the proxy index for a given sourceIndex, which can be from any of the source models.

pub unsafe fn map_to_source(
    &self,
    proxy_index: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QModelIndex>
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Returns the source index for a given proxyIndex.

Calls C++ function: QModelIndex QConcatenateTablesProxyModel::mapToSource(const QModelIndex& proxyIndex) const.

C++ documentation:

Returns the source index for a given proxyIndex.

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Calls C++ function: virtual const QMetaObject* QConcatenateTablesProxyModel::metaObject() const.

pub unsafe fn mime_data(
    &self,
    indexes: impl CastInto<Ref<QListOfQModelIndex>>
) -> QPtr<QMimeData>
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::mimeData(const QModelIndexList &indexes) const.

Calls C++ function: virtual QMimeData* QConcatenateTablesProxyModel::mimeData(const QList<QModelIndex>& indexes) const.

C++ documentation:

Reimplements: QAbstractItemModel::mimeData(const QModelIndexList &indexes) const.

The call is forwarded to the source model of the first index in the list of indexes.

Important: please note that this proxy only supports dragging a single row. It will assert if called with indexes from multiple rows, because dragging rows that might come from different source models cannot be implemented generically by this proxy model. Each piece of data in the QMimeData needs to be merged, which is data-type-specific. Reimplement this method in a subclass if you want to support dragging multiple rows.

pub unsafe fn mime_types(&self) -> CppBox<QStringList>[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::mimeTypes() const.

Calls C++ function: virtual QStringList QConcatenateTablesProxyModel::mimeTypes() const.

C++ documentation:

Reimplements: QAbstractItemModel::mimeTypes() const.

This method returns the mime types for the first source model.

pub unsafe fn new_1a(
    parent: impl CastInto<Ptr<QObject>>
) -> QBox<QConcatenateTablesProxyModel>
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Constructs a concatenate-rows proxy model with the given parent.

Calls C++ function: [constructor] void QConcatenateTablesProxyModel::QConcatenateTablesProxyModel(QObject* parent = …).

C++ documentation:

Constructs a concatenate-rows proxy model with the given parent.

pub unsafe fn new_0a() -> QBox<QConcatenateTablesProxyModel>[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

QConcatenateTablesProxyModel takes multiple source models and concatenates their rows.

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

C++ documentation:

QConcatenateTablesProxyModel takes multiple source models and concatenates their rows.

In other words, the proxy will have all rows of the first source model, followed by all rows of the second source model, and so on.

If the source models don't have the same number of columns, the proxy will only have as many columns as the source model with the smallest number of columns. Additional columns in other source models will simply be ignored.

Source models can be added and removed at runtime, and the column count is adjusted accordingly.

This proxy does not inherit from QAbstractProxyModel because it uses multiple source models, rather than a single one.

Only flat models (lists and tables) are supported, tree models are not.

pub unsafe fn parent(
    &self,
    index: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QModelIndex>
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::parent(const QModelIndex &index) const.

Calls C++ function: virtual QModelIndex QConcatenateTablesProxyModel::parent(const QModelIndex& index) const.

C++ documentation:

Reimplements: QAbstractItemModel::parent(const QModelIndex &index) const.

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Calls C++ function: virtual int QConcatenateTablesProxyModel::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Calls C++ function: virtual void* QConcatenateTablesProxyModel::qt_metacast(const char* arg1).

pub unsafe fn remove_source_model(
    &self,
    source_model: impl CastInto<Ptr<QAbstractItemModel>>
)
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Removes the source model sourceModel, which was previously added to this proxy.

Calls C++ function: void QConcatenateTablesProxyModel::removeSourceModel(QAbstractItemModel* sourceModel).

C++ documentation:

Removes the source model sourceModel, which was previously added to this proxy.

The ownership of sourceModel is not affected by this.

pub unsafe fn row_count_1a(
    &self,
    parent: impl CastInto<Ref<QModelIndex>>
) -> c_int
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::rowCount(const QModelIndex &parent) const.

Calls C++ function: virtual int QConcatenateTablesProxyModel::rowCount(const QModelIndex& parent = …) const.

C++ documentation:

Reimplements: QAbstractItemModel::rowCount(const QModelIndex &parent) const.

pub unsafe fn row_count_0a(&self) -> c_int[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::rowCount(const QModelIndex &parent) const.

Calls C++ function: virtual int QConcatenateTablesProxyModel::rowCount() const.

C++ documentation:

Reimplements: QAbstractItemModel::rowCount(const QModelIndex &parent) const.

pub unsafe fn set_data_3a(
    &self,
    index: impl CastInto<Ref<QModelIndex>>,
    value: impl CastInto<Ref<QVariant>>,
    role: c_int
) -> bool
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::setData(const QModelIndex &index, const QVariant &value, int role).

Calls C++ function: virtual bool QConcatenateTablesProxyModel::setData(const QModelIndex& index, const QVariant& value, int role = …).

C++ documentation:

Reimplements: QAbstractItemModel::setData(const QModelIndex &index, const QVariant &value, int role).

See also data().

pub unsafe fn set_data_2a(
    &self,
    index: impl CastInto<Ref<QModelIndex>>,
    value: impl CastInto<Ref<QVariant>>
) -> bool
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::setData(const QModelIndex &index, const QVariant &value, int role).

Calls C++ function: virtual bool QConcatenateTablesProxyModel::setData(const QModelIndex& index, const QVariant& value).

C++ documentation:

Reimplements: QAbstractItemModel::setData(const QModelIndex &index, const QVariant &value, int role).

See also data().

pub unsafe fn set_item_data(
    &self,
    index: impl CastInto<Ref<QModelIndex>>,
    roles: impl CastInto<Ref<QMapOfIntQVariant>>
) -> bool
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles).

Calls C++ function: virtual bool QConcatenateTablesProxyModel::setItemData(const QModelIndex& index, const QMap<int, QVariant>& roles).

C++ documentation:

Reimplements: QAbstractItemModel::setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles).

See also itemData().

pub unsafe fn span(
    &self,
    index: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QSize>
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Reimplements: QAbstractItemModel::span(const QModelIndex &index) const.

Calls C++ function: virtual QSize QConcatenateTablesProxyModel::span(const QModelIndex& index) const.

C++ documentation:

Reimplements: QAbstractItemModel::span(const QModelIndex &index) const.

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Returns a reference to the staticMetaObject field.

pub unsafe fn tr(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Calls C++ function: static QString QConcatenateTablesProxyModel::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Calls C++ function: static QString QConcatenateTablesProxyModel::trUtf8(const char* s, const char* c, int n).

Methods from Deref<Target = QAbstractItemModel>

pub fn header_data_changed(&self) -> Signal<(Orientation, c_int, c_int)>[src]

This signal is emitted whenever a header is changed. The orientation indicates whether the horizontal or vertical header has changed. The sections in the header from the first to the last need to be updated.

Returns a built-in Qt signal QAbstractItemModel::headerDataChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted whenever a header is changed. The orientation indicates whether the horizontal or vertical header has changed. The sections in the header from the first to the last need to be updated.

When reimplementing the setHeaderData() function, this signal must be emitted explicitly.

If you are changing the number of columns or rows you do not need to emit this signal, but use the begin/end functions (refer to the section on subclassing in the QAbstractItemModel class description for details).

See also headerData(), setHeaderData(), and dataChanged().

pub fn rows_about_to_be_inserted(
    &self
) -> Signal<(*const QModelIndex, c_int, c_int)>
[src]

This signal is emitted just before rows are inserted into the model. The new items will be positioned between start and end inclusive, under the given parent item.

Returns a built-in Qt signal QAbstractItemModel::rowsAboutToBeInserted that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted just before rows are inserted into the model. The new items will be positioned between start and end inclusive, under the given parent item.

Note: Components connected to this signal use it to adapt to changes in the model's dimensions. It can only be emitted by the QAbstractItemModel implementation, and cannot be explicitly emitted in subclass code.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

See also insertRows() and beginInsertRows().

pub fn rows_inserted(&self) -> Signal<(*const QModelIndex, c_int, c_int)>[src]

This signal is emitted after rows have been inserted into the model. The new items are those between first and last inclusive, under the given parent item.

Returns a built-in Qt signal QAbstractItemModel::rowsInserted that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted after rows have been inserted into the model. The new items are those between first and last inclusive, under the given parent item.

Note: Components connected to this signal use it to adapt to changes in the model's dimensions. It can only be emitted by the QAbstractItemModel implementation, and cannot be explicitly emitted in subclass code.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

See also insertRows() and beginInsertRows().

pub fn rows_about_to_be_removed(
    &self
) -> Signal<(*const QModelIndex, c_int, c_int)>
[src]

This signal is emitted just before rows are removed from the model. The items that will be removed are those between first and last inclusive, under the given parent item.

Returns a built-in Qt signal QAbstractItemModel::rowsAboutToBeRemoved that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted just before rows are removed from the model. The items that will be removed are those between first and last inclusive, under the given parent item.

Note: Components connected to this signal use it to adapt to changes in the model's dimensions. It can only be emitted by the QAbstractItemModel implementation, and cannot be explicitly emitted in subclass code.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

See also removeRows() and beginRemoveRows().

pub fn rows_removed(&self) -> Signal<(*const QModelIndex, c_int, c_int)>[src]

This signal is emitted after rows have been removed from the model. The removed items are those between first and last inclusive, under the given parent item.

Returns a built-in Qt signal QAbstractItemModel::rowsRemoved that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted after rows have been removed from the model. The removed items are those between first and last inclusive, under the given parent item.

Note: Components connected to this signal use it to adapt to changes in the model's dimensions. It can only be emitted by the QAbstractItemModel implementation, and cannot be explicitly emitted in subclass code.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

See also removeRows() and beginRemoveRows().

pub fn columns_about_to_be_inserted(
    &self
) -> Signal<(*const QModelIndex, c_int, c_int)>
[src]

This signal is emitted just before columns are inserted into the model. The new items will be positioned between first and last inclusive, under the given parent item.

Returns a built-in Qt signal QAbstractItemModel::columnsAboutToBeInserted that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted just before columns are inserted into the model. The new items will be positioned between first and last inclusive, under the given parent item.

Note: Components connected to this signal use it to adapt to changes in the model's dimensions. It can only be emitted by the QAbstractItemModel implementation, and cannot be explicitly emitted in subclass code.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

See also insertColumns() and beginInsertColumns().

pub fn columns_inserted(&self) -> Signal<(*const QModelIndex, c_int, c_int)>[src]

This signal is emitted after columns have been inserted into the model. The new items are those between first and last inclusive, under the given parent item.

Returns a built-in Qt signal QAbstractItemModel::columnsInserted that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted after columns have been inserted into the model. The new items are those between first and last inclusive, under the given parent item.

Note: Components connected to this signal use it to adapt to changes in the model's dimensions. It can only be emitted by the QAbstractItemModel implementation, and cannot be explicitly emitted in subclass code.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

See also insertColumns() and beginInsertColumns().

pub fn columns_about_to_be_removed(
    &self
) -> Signal<(*const QModelIndex, c_int, c_int)>
[src]

This signal is emitted just before columns are removed from the model. The items to be removed are those between first and last inclusive, under the given parent item.

Returns a built-in Qt signal QAbstractItemModel::columnsAboutToBeRemoved that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted just before columns are removed from the model. The items to be removed are those between first and last inclusive, under the given parent item.

Note: Components connected to this signal use it to adapt to changes in the model's dimensions. It can only be emitted by the QAbstractItemModel implementation, and cannot be explicitly emitted in subclass code.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

See also removeColumns() and beginRemoveColumns().

pub fn columns_removed(&self) -> Signal<(*const QModelIndex, c_int, c_int)>[src]

This signal is emitted after columns have been removed from the model. The removed items are those between first and last inclusive, under the given parent item.

Returns a built-in Qt signal QAbstractItemModel::columnsRemoved that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted after columns have been removed from the model. The removed items are those between first and last inclusive, under the given parent item.

Note: Components connected to this signal use it to adapt to changes in the model's dimensions. It can only be emitted by the QAbstractItemModel implementation, and cannot be explicitly emitted in subclass code.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

See also removeColumns() and beginRemoveColumns().

pub fn model_about_to_be_reset(&self) -> Signal<()>[src]

This signal is emitted when beginResetModel() is called, before the model's internal state (e.g. persistent model indexes) has been invalidated.

Returns a built-in Qt signal QAbstractItemModel::modelAboutToBeReset that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when beginResetModel() is called, before the model's internal state (e.g. persistent model indexes) has been invalidated.

This function was introduced in Qt 4.2.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

See also beginResetModel() and modelReset().

pub fn model_reset(&self) -> Signal<()>[src]

This signal is emitted when endResetModel() is called, after the model's internal state (e.g. persistent model indexes) has been invalidated.

Returns a built-in Qt signal QAbstractItemModel::modelReset that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when endResetModel() is called, after the model's internal state (e.g. persistent model indexes) has been invalidated.

Note that if a model is reset it should be considered that all information previously retrieved from it is invalid. This includes but is not limited to the rowCount() and columnCount(), flags(), data retrieved through data(), and roleNames().

This function was introduced in Qt 4.1.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

See also endResetModel() and modelAboutToBeReset().

pub fn rows_about_to_be_moved(
    &self
) -> Signal<(*const QModelIndex, c_int, c_int, *const QModelIndex, c_int)>
[src]

This signal is emitted just before rows are moved within the model. The items that will be moved are those between sourceStart and sourceEnd inclusive, under the given sourceParent item. They will be moved to destinationParent starting at the row destinationRow.

Returns a built-in Qt signal QAbstractItemModel::rowsAboutToBeMoved that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted just before rows are moved within the model. The items that will be moved are those between sourceStart and sourceEnd inclusive, under the given sourceParent item. They will be moved to destinationParent starting at the row destinationRow.

Note: Components connected to this signal use it to adapt to changes in the model's dimensions. It can only be emitted by the QAbstractItemModel implementation, and cannot be explicitly emitted in subclass code.

This function was introduced in Qt 4.6.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

See also beginMoveRows().

pub fn rows_moved(
    &self
) -> Signal<(*const QModelIndex, c_int, c_int, *const QModelIndex, c_int)>
[src]

This signal is emitted after rows have been moved within the model. The items between start and end inclusive, under the given parent item have been moved to destination starting at the row row.

Returns a built-in Qt signal QAbstractItemModel::rowsMoved that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted after rows have been moved within the model. The items between start and end inclusive, under the given parent item have been moved to destination starting at the row row.

Note: Components connected to this signal use it to adapt to changes in the model's dimensions. It can only be emitted by the QAbstractItemModel implementation, and cannot be explicitly emitted in subclass code.

This function was introduced in Qt 4.6.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

See also beginMoveRows().

pub fn columns_about_to_be_moved(
    &self
) -> Signal<(*const QModelIndex, c_int, c_int, *const QModelIndex, c_int)>
[src]

This signal is emitted just before columns are moved within the model. The items that will be moved are those between sourceStart and sourceEnd inclusive, under the given sourceParent item. They will be moved to destinationParent starting at the column destinationColumn.

Returns a built-in Qt signal QAbstractItemModel::columnsAboutToBeMoved that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted just before columns are moved within the model. The items that will be moved are those between sourceStart and sourceEnd inclusive, under the given sourceParent item. They will be moved to destinationParent starting at the column destinationColumn.

Note: Components connected to this signal use it to adapt to changes in the model's dimensions. It can only be emitted by the QAbstractItemModel implementation, and cannot be explicitly emitted in subclass code.

This function was introduced in Qt 4.6.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

See also beginMoveRows().

pub fn columns_moved(
    &self
) -> Signal<(*const QModelIndex, c_int, c_int, *const QModelIndex, c_int)>
[src]

This signal is emitted after columns have been moved within the model. The items between start and end inclusive, under the given parent item have been moved to destination starting at the column column.

Returns a built-in Qt signal QAbstractItemModel::columnsMoved that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted after columns have been moved within the model. The items between start and end inclusive, under the given parent item have been moved to destination starting at the column column.

Note: Components connected to this signal use it to adapt to changes in the model's dimensions. It can only be emitted by the QAbstractItemModel implementation, and cannot be explicitly emitted in subclass code.

This function was introduced in Qt 4.6.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

See also beginMoveRows().

pub fn slot_submit(&self) -> Receiver<()>[src]

Lets the model know that it should submit cached information to permanent storage. This function is typically used for row editing.

Returns a built-in Qt slot QAbstractItemModel::submit that can be passed to qt_core::Signal::connect.

C++ documentation:

Lets the model know that it should submit cached information to permanent storage. This function is typically used for row editing.

Returns true if there is no error; otherwise returns false.

See also revert().

pub fn slot_revert(&self) -> Receiver<()>[src]

Lets the model know that it should discard cached information. This function is typically used for row editing.

Returns a built-in Qt slot QAbstractItemModel::revert that can be passed to qt_core::Signal::connect.

C++ documentation:

Lets the model know that it should discard cached information. This function is typically used for row editing.

See also submit().

pub fn slot_reset_internal_data(&self) -> Receiver<()>[src]

This slot is called just after the internal data of a model is cleared while it is being reset.

Returns a built-in Qt slot QAbstractItemModel::resetInternalData that can be passed to qt_core::Signal::connect.

C++ documentation:

This slot is called just after the internal data of a model is cleared while it is being reset.

This slot is provided the convenience of subclasses of concrete proxy models, such as subclasses of QSortFilterProxyModel which maintain extra data.

class CustomDataProxy : public QSortFilterProxyModel { Q_OBJECT public: CustomDataProxy(QObject *parent) : QSortFilterProxyModel(parent) { }

...

QVariant data(const QModelIndex &index, int role) { if (role != Qt::BackgroundRole) return QSortFilterProxyModel::data(index, role);

if (m_customData.contains(index.row())) return m_customData.value(index.row()); return QSortFilterProxyModel::data(index, role); }

private slots: void resetInternalData() { m_customData.clear(); }

private: QHash<int, QVariant> m_customData; };

Note: Due to a mistake, this slot is missing in Qt 5.0.

This function was introduced in Qt 4.8.

See also modelAboutToBeReset() and modelReset().

pub fn data_changed(
    &self
) -> Signal<(*const QModelIndex, *const QModelIndex, *const QVectorOfInt)>
[src]

This signal is emitted whenever the data in an existing item changes.

Returns a built-in Qt signal QAbstractItemModel::dataChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted whenever the data in an existing item changes.

If the items are of the same parent, the affected ones are those between topLeft and bottomRight inclusive. If the items do not have the same parent, the behavior is undefined.

When reimplementing the setData() function, this signal must be emitted explicitly.

The optional roles argument can be used to specify which data roles have actually been modified. An empty vector in the roles argument means that all roles should be considered modified. The order of elements in the roles argument does not have any relevance.

See also headerDataChanged(), setData(), and layoutChanged().

pub fn layout_changed(
    &self
) -> Signal<(*const QListOfQPersistentModelIndex, LayoutChangeHint)>
[src]

This signal is emitted whenever the layout of items exposed by the model has changed; for example, when the model has been sorted. When this signal is received by a view, it should update the layout of items to reflect this change.

Returns a built-in Qt signal QAbstractItemModel::layoutChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted whenever the layout of items exposed by the model has changed; for example, when the model has been sorted. When this signal is received by a view, it should update the layout of items to reflect this change.

When subclassing QAbstractItemModel or QAbstractProxyModel, ensure that you emit layoutAboutToBeChanged() before changing the order of items or altering the structure of the data you expose to views, and emit layoutChanged() after changing the layout.

The optional parents parameter is used to give a more specific notification about what parts of the layout of the model are changing. An empty list indicates a change to the layout of the entire model. The order of elements in the parents list is not significant. The optional hint parameter is used to give a hint about what is happening while the model is relayouting.

Subclasses should update any persistent model indexes before emitting layoutChanged(). In other words, when the structure changes:

This function was introduced in Qt 5.0.

See also layoutAboutToBeChanged(), dataChanged(), headerDataChanged(), modelReset(), and changePersistentIndex().

pub fn layout_about_to_be_changed(
    &self
) -> Signal<(*const QListOfQPersistentModelIndex, LayoutChangeHint)>
[src]

This signal is emitted just before the layout of a model is changed. Components connected to this signal use it to adapt to changes in the model's layout.

Returns a built-in Qt signal QAbstractItemModel::layoutAboutToBeChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted just before the layout of a model is changed. Components connected to this signal use it to adapt to changes in the model's layout.

Subclasses should update any persistent model indexes after emitting layoutAboutToBeChanged().

The optional parents parameter is used to give a more specific notification about what parts of the layout of the model are changing. An empty list indicates a change to the layout of the entire model. The order of elements in the parents list is not significant. The optional hint parameter is used to give a hint about what is happening while the model is relayouting.

This function was introduced in Qt 5.0.

See also layoutChanged() and changePersistentIndex().

pub unsafe fn buddy(
    &self,
    index: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QModelIndex>
[src]

Returns a model index for the buddy of the item represented by index. When the user wants to edit an item, the view will call this function to check whether another item in the model should be edited instead. Then, the view will construct a delegate using the model index returned by the buddy item.

Calls C++ function: virtual QModelIndex QAbstractItemModel::buddy(const QModelIndex& index) const.

C++ documentation:

Returns a model index for the buddy of the item represented by index. When the user wants to edit an item, the view will call this function to check whether another item in the model should be edited instead. Then, the view will construct a delegate using the model index returned by the buddy item.

The default implementation of this function has each item as its own buddy.

pub unsafe fn can_drop_mime_data(
    &self,
    data: impl CastInto<Ptr<QMimeData>>,
    action: DropAction,
    row: c_int,
    column: c_int,
    parent: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

Returns true if a model can accept a drop of the data. This default implementation only checks if data has at least one format in the list of mimeTypes() and if action is among the model's supportedDropActions().

Calls C++ function: virtual bool QAbstractItemModel::canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const.

C++ documentation:

Returns true if a model can accept a drop of the data. This default implementation only checks if data has at least one format in the list of mimeTypes() and if action is among the model's supportedDropActions().

Reimplement this function in your custom model, if you want to test whether the data can be dropped at row, column, parent with action. If you don't need that test, it is not necessary to reimplement this function.

See also dropMimeData() and Using drag and drop with item views.

pub unsafe fn can_fetch_more(
    &self,
    parent: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

Returns true if there is more data available for parent; otherwise returns false.

Calls C++ function: virtual bool QAbstractItemModel::canFetchMore(const QModelIndex& parent) const.

C++ documentation:

Returns true if there is more data available for parent; otherwise returns false.

The default implementation always returns false.

If canFetchMore() returns true, the fetchMore() function should be called. This is the behavior of QAbstractItemView, for example.

See also fetchMore().

pub unsafe fn check_index_2a(
    &self,
    index: impl CastInto<Ref<QModelIndex>>,
    options: QFlags<CheckIndexOption>
) -> bool
[src]

This is supported on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

This function checks whether index is a legal model index for this model. A legal model index is either an invalid model index, or a valid model index for which all the following holds:

Calls C++ function: bool QAbstractItemModel::checkIndex(const QModelIndex& index, QFlags<QAbstractItemModel::CheckIndexOption> options = …) const.

C++ documentation:

This function checks whether index is a legal model index for this model. A legal model index is either an invalid model index, or a valid model index for which all the following holds:

  • the index' model is this;
  • the index' row is greater or equal than zero;
  • the index' row is less than the row count for the index' parent;
  • the index' column is greater or equal than zero;
  • the index' column is less than the column count for the index' parent.

The options argument may change some of these checks. If options contains IndexIsValid, then index must be a valid index; this is useful when reimplementing functions such as data() or setData(), which expect valid indexes.

If options contains DoNotUseParent, then the checks that would call parent() are omitted; this allows calling this function from a parent() reimplementation (otherwise, this would result in endless recursion and a crash).

If options does not contain DoNotUseParent, and it contains ParentIsInvalid, then an additional check is performed: the parent index is checked for not being valid. This is useful when implementing flat models such as lists or tables, where no model index should have a valid parent index.

This function returns true if all the checks succeeded, and false otherwise. This allows to use the function in Q_ASSERT and similar other debugging mechanisms. If some check failed, a warning message will be printed in the qt.core.qabstractitemmodel.checkindex logging category, containing some information that may be useful for debugging the failure.

Note: This function is a debugging helper for implementing your own item models. When developing complex models, as well as when building complicated model hierarchies (e.g. using proxy models), it is useful to call this function in order to catch bugs relative to illegal model indices (as defined above) accidentally passed to some QAbstractItemModel API.

Warning: Note that it's undefined behavior to pass illegal indices to item models, so applications must refrain from doing so, and not rely on any "defensive" programming that item models could employ to handle illegal indexes gracefully.

This function was introduced in Qt 5.11.

See also QModelIndex.

pub unsafe fn check_index_1a(
    &self,
    index: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

This is supported on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

This function checks whether index is a legal model index for this model. A legal model index is either an invalid model index, or a valid model index for which all the following holds:

Calls C++ function: bool QAbstractItemModel::checkIndex(const QModelIndex& index) const.

C++ documentation:

This function checks whether index is a legal model index for this model. A legal model index is either an invalid model index, or a valid model index for which all the following holds:

  • the index' model is this;
  • the index' row is greater or equal than zero;
  • the index' row is less than the row count for the index' parent;
  • the index' column is greater or equal than zero;
  • the index' column is less than the column count for the index' parent.

The options argument may change some of these checks. If options contains IndexIsValid, then index must be a valid index; this is useful when reimplementing functions such as data() or setData(), which expect valid indexes.

If options contains DoNotUseParent, then the checks that would call parent() are omitted; this allows calling this function from a parent() reimplementation (otherwise, this would result in endless recursion and a crash).

If options does not contain DoNotUseParent, and it contains ParentIsInvalid, then an additional check is performed: the parent index is checked for not being valid. This is useful when implementing flat models such as lists or tables, where no model index should have a valid parent index.

This function returns true if all the checks succeeded, and false otherwise. This allows to use the function in Q_ASSERT and similar other debugging mechanisms. If some check failed, a warning message will be printed in the qt.core.qabstractitemmodel.checkindex logging category, containing some information that may be useful for debugging the failure.

Note: This function is a debugging helper for implementing your own item models. When developing complex models, as well as when building complicated model hierarchies (e.g. using proxy models), it is useful to call this function in order to catch bugs relative to illegal model indices (as defined above) accidentally passed to some QAbstractItemModel API.

Warning: Note that it's undefined behavior to pass illegal indices to item models, so applications must refrain from doing so, and not rely on any "defensive" programming that item models could employ to handle illegal indexes gracefully.

This function was introduced in Qt 5.11.

See also QModelIndex.

pub unsafe fn column_count_1a(
    &self,
    parent: impl CastInto<Ref<QModelIndex>>
) -> c_int
[src]

Returns the number of columns for the children of the given parent.

Calls C++ function: pure virtual int QAbstractItemModel::columnCount(const QModelIndex& parent = …) const.

C++ documentation:

Returns the number of columns for the children of the given parent.

In most subclasses, the number of columns is independent of the parent.

For example:

int DomModel::columnCount(const QModelIndex &/parent/) const { return 3; }

Note: When implementing a table based model, columnCount() should return 0 when the parent is valid.

See also rowCount().

pub unsafe fn column_count_0a(&self) -> c_int[src]

Returns the number of columns for the children of the given parent.

Calls C++ function: pure virtual int QAbstractItemModel::columnCount() const.

C++ documentation:

Returns the number of columns for the children of the given parent.

In most subclasses, the number of columns is independent of the parent.

For example:

int DomModel::columnCount(const QModelIndex &/parent/) const { return 3; }

Note: When implementing a table based model, columnCount() should return 0 when the parent is valid.

See also rowCount().

pub unsafe fn data_2a(
    &self,
    index: impl CastInto<Ref<QModelIndex>>,
    role: c_int
) -> CppBox<QVariant>
[src]

Returns the data stored under the given role for the item referred to by the index.

Calls C++ function: pure virtual QVariant QAbstractItemModel::data(const QModelIndex& index, int role = …) const.

C++ documentation:

Returns the data stored under the given role for the item referred to by the index.

Note: If you do not have a value to return, return an invalid QVariant instead of returning 0.

See also Qt::ItemDataRole, setData(), and headerData().

pub unsafe fn data_1a(
    &self,
    index: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QVariant>
[src]

Returns the data stored under the given role for the item referred to by the index.

Calls C++ function: pure virtual QVariant QAbstractItemModel::data(const QModelIndex& index) const.

C++ documentation:

Returns the data stored under the given role for the item referred to by the index.

Note: If you do not have a value to return, return an invalid QVariant instead of returning 0.

See also Qt::ItemDataRole, setData(), and headerData().

pub unsafe fn drop_mime_data(
    &self,
    data: impl CastInto<Ptr<QMimeData>>,
    action: DropAction,
    row: c_int,
    column: c_int,
    parent: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

Handles the data supplied by a drag and drop operation that ended with the given action.

Calls C++ function: virtual bool QAbstractItemModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent).

C++ documentation:

Handles the data supplied by a drag and drop operation that ended with the given action.

Returns true if the data and action were handled by the model; otherwise returns false.

The specified row, column and parent indicate the location of an item in the model where the operation ended. It is the responsibility of the model to complete the action at the correct location.

For instance, a drop action on an item in a QTreeView can result in new items either being inserted as children of the item specified by row, column, and parent, or as siblings of the item.

When row and column are -1 it means that the dropped data should be considered as dropped directly on parent. Usually this will mean appending the data as child items of parent. If row and column are greater than or equal zero, it means that the drop occurred just before the specified row and column in the specified parent.

The mimeTypes() member is called to get the list of acceptable MIME types. This default implementation assumes the default implementation of mimeTypes(), which returns a single default MIME type. If you reimplement mimeTypes() in your custom model to return multiple MIME types, you must reimplement this function to make use of them.

See also supportedDropActions(), canDropMimeData(), and Using drag and drop with item views.

pub unsafe fn fetch_more(&self, parent: impl CastInto<Ref<QModelIndex>>)[src]

Fetches any available data for the items with the parent specified by the parent index.

Calls C++ function: virtual void QAbstractItemModel::fetchMore(const QModelIndex& parent).

C++ documentation:

Fetches any available data for the items with the parent specified by the parent index.

Reimplement this if you are populating your model incrementally.

The default implementation does nothing.

See also canFetchMore().

pub unsafe fn flags(
    &self,
    index: impl CastInto<Ref<QModelIndex>>
) -> QFlags<ItemFlag>
[src]

Returns the item flags for the given index.

Calls C++ function: virtual QFlags<Qt::ItemFlag> QAbstractItemModel::flags(const QModelIndex& index) const.

C++ documentation:

Returns the item flags for the given index.

The base class implementation returns a combination of flags that enables the item (ItemIsEnabled) and allows it to be selected (ItemIsSelectable).

See also Qt::ItemFlags.

pub unsafe fn has_children_1a(
    &self,
    parent: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

Returns true if parent has any children; otherwise returns false.

Calls C++ function: virtual bool QAbstractItemModel::hasChildren(const QModelIndex& parent = …) const.

C++ documentation:

Returns true if parent has any children; otherwise returns false.

Use rowCount() on the parent to find out the number of children.

Note that it is undefined behavior to report that a particular index hasChildren with this method if the same index has the flag Qt::ItemNeverHasChildren set.

See also parent() and index().

pub unsafe fn has_children_0a(&self) -> bool[src]

Returns true if parent has any children; otherwise returns false.

Calls C++ function: virtual bool QAbstractItemModel::hasChildren() const.

C++ documentation:

Returns true if parent has any children; otherwise returns false.

Use rowCount() on the parent to find out the number of children.

Note that it is undefined behavior to report that a particular index hasChildren with this method if the same index has the flag Qt::ItemNeverHasChildren set.

See also parent() and index().

pub unsafe fn has_index_3a(
    &self,
    row: c_int,
    column: c_int,
    parent: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

Returns true if the model returns a valid QModelIndex for row and column with parent, otherwise returns false.

Calls C++ function: bool QAbstractItemModel::hasIndex(int row, int column, const QModelIndex& parent = …) const.

C++ documentation:

Returns true if the model returns a valid QModelIndex for row and column with parent, otherwise returns false.

pub unsafe fn has_index_2a(&self, row: c_int, column: c_int) -> bool[src]

Returns true if the model returns a valid QModelIndex for row and column with parent, otherwise returns false.

Calls C++ function: bool QAbstractItemModel::hasIndex(int row, int column) const.

C++ documentation:

Returns true if the model returns a valid QModelIndex for row and column with parent, otherwise returns false.

pub unsafe fn header_data_3a(
    &self,
    section: c_int,
    orientation: Orientation,
    role: c_int
) -> CppBox<QVariant>
[src]

Returns the data for the given role and section in the header with the specified orientation.

Calls C++ function: virtual QVariant QAbstractItemModel::headerData(int section, Qt::Orientation orientation, int role = …) const.

C++ documentation:

Returns the data for the given role and section in the header with the specified orientation.

For horizontal headers, the section number corresponds to the column number. Similarly, for vertical headers, the section number corresponds to the row number.

See also Qt::ItemDataRole, setHeaderData(), and QHeaderView.

pub unsafe fn header_data_2a(
    &self,
    section: c_int,
    orientation: Orientation
) -> CppBox<QVariant>
[src]

Returns the data for the given role and section in the header with the specified orientation.

Calls C++ function: virtual QVariant QAbstractItemModel::headerData(int section, Qt::Orientation orientation) const.

C++ documentation:

Returns the data for the given role and section in the header with the specified orientation.

For horizontal headers, the section number corresponds to the column number. Similarly, for vertical headers, the section number corresponds to the row number.

See also Qt::ItemDataRole, setHeaderData(), and QHeaderView.

pub unsafe fn index_3a(
    &self,
    row: c_int,
    column: c_int,
    parent: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QModelIndex>
[src]

Returns the index of the item in the model specified by the given row, column and parent index.

Calls C++ function: pure virtual QModelIndex QAbstractItemModel::index(int row, int column, const QModelIndex& parent = …) const.

C++ documentation:

Returns the index of the item in the model specified by the given row, column and parent index.

When reimplementing this function in a subclass, call createIndex() to generate model indexes that other components can use to refer to items in your model.

See also createIndex().

pub unsafe fn index_2a(&self, row: c_int, column: c_int) -> CppBox<QModelIndex>[src]

Returns the index of the item in the model specified by the given row, column and parent index.

Calls C++ function: pure virtual QModelIndex QAbstractItemModel::index(int row, int column) const.

C++ documentation:

Returns the index of the item in the model specified by the given row, column and parent index.

When reimplementing this function in a subclass, call createIndex() to generate model indexes that other components can use to refer to items in your model.

See also createIndex().

pub unsafe fn insert_column_2a(
    &self,
    column: c_int,
    parent: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

Inserts a single column before the given column in the child items of the parent specified.

Calls C++ function: bool QAbstractItemModel::insertColumn(int column, const QModelIndex& parent = …).

C++ documentation:

Inserts a single column before the given column in the child items of the parent specified.

Returns true if the column is inserted; otherwise returns false.

See also insertColumns(), insertRow(), and removeColumn().

pub unsafe fn insert_column_1a(&self, column: c_int) -> bool[src]

Inserts a single column before the given column in the child items of the parent specified.

Calls C++ function: bool QAbstractItemModel::insertColumn(int column).

C++ documentation:

Inserts a single column before the given column in the child items of the parent specified.

Returns true if the column is inserted; otherwise returns false.

See also insertColumns(), insertRow(), and removeColumn().

pub unsafe fn insert_columns_3a(
    &self,
    column: c_int,
    count: c_int,
    parent: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

On models that support this, inserts count new columns into the model before the given column. The items in each new column will be children of the item represented by the parent model index.

Calls C++ function: virtual bool QAbstractItemModel::insertColumns(int column, int count, const QModelIndex& parent = …).

C++ documentation:

On models that support this, inserts count new columns into the model before the given column. The items in each new column will be children of the item represented by the parent model index.

If column is 0, the columns are prepended to any existing columns.

If column is columnCount(), the columns are appended to any existing columns.

If parent has no children, a single row with count columns is inserted.

Returns true if the columns were successfully inserted; otherwise returns false.

The base class implementation does nothing and returns false.

If you implement your own model, you can reimplement this function if you want to support insertions. Alternatively, you can provide your own API for altering the data.

See also insertRows(), removeColumns(), beginInsertColumns(), and endInsertColumns().

pub unsafe fn insert_columns_2a(&self, column: c_int, count: c_int) -> bool[src]

On models that support this, inserts count new columns into the model before the given column. The items in each new column will be children of the item represented by the parent model index.

Calls C++ function: virtual bool QAbstractItemModel::insertColumns(int column, int count).

C++ documentation:

On models that support this, inserts count new columns into the model before the given column. The items in each new column will be children of the item represented by the parent model index.

If column is 0, the columns are prepended to any existing columns.

If column is columnCount(), the columns are appended to any existing columns.

If parent has no children, a single row with count columns is inserted.

Returns true if the columns were successfully inserted; otherwise returns false.

The base class implementation does nothing and returns false.

If you implement your own model, you can reimplement this function if you want to support insertions. Alternatively, you can provide your own API for altering the data.

See also insertRows(), removeColumns(), beginInsertColumns(), and endInsertColumns().

pub unsafe fn insert_row_2a(
    &self,
    row: c_int,
    parent: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

Inserts a single row before the given row in the child items of the parent specified.

Calls C++ function: bool QAbstractItemModel::insertRow(int row, const QModelIndex& parent = …).

C++ documentation:

Inserts a single row before the given row in the child items of the parent specified.

Note: This function calls the virtual method insertRows.

Returns true if the row is inserted; otherwise returns false.

See also insertRows(), insertColumn(), and removeRow().

pub unsafe fn insert_row_1a(&self, row: c_int) -> bool[src]

Inserts a single row before the given row in the child items of the parent specified.

Calls C++ function: bool QAbstractItemModel::insertRow(int row).

C++ documentation:

Inserts a single row before the given row in the child items of the parent specified.

Note: This function calls the virtual method insertRows.

Returns true if the row is inserted; otherwise returns false.

See also insertRows(), insertColumn(), and removeRow().

pub unsafe fn insert_rows_3a(
    &self,
    row: c_int,
    count: c_int,
    parent: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

Note: The base class implementation of this function does nothing and returns false.

Calls C++ function: virtual bool QAbstractItemModel::insertRows(int row, int count, const QModelIndex& parent = …).

C++ documentation:

Note: The base class implementation of this function does nothing and returns false.

On models that support this, inserts count rows into the model before the given row. Items in the new row will be children of the item represented by the parent model index.

If row is 0, the rows are prepended to any existing rows in the parent.

If row is rowCount(), the rows are appended to any existing rows in the parent.

If parent has no children, a single column with count rows is inserted.

Returns true if the rows were successfully inserted; otherwise returns false.

If you implement your own model, you can reimplement this function if you want to support insertions. Alternatively, you can provide your own API for altering the data. In either case, you will need to call beginInsertRows() and endInsertRows() to notify other components that the model has changed.

See also insertColumns(), removeRows(), beginInsertRows(), and endInsertRows().

pub unsafe fn insert_rows_2a(&self, row: c_int, count: c_int) -> bool[src]

Note: The base class implementation of this function does nothing and returns false.

Calls C++ function: virtual bool QAbstractItemModel::insertRows(int row, int count).

C++ documentation:

Note: The base class implementation of this function does nothing and returns false.

On models that support this, inserts count rows into the model before the given row. Items in the new row will be children of the item represented by the parent model index.

If row is 0, the rows are prepended to any existing rows in the parent.

If row is rowCount(), the rows are appended to any existing rows in the parent.

If parent has no children, a single column with count rows is inserted.

Returns true if the rows were successfully inserted; otherwise returns false.

If you implement your own model, you can reimplement this function if you want to support insertions. Alternatively, you can provide your own API for altering the data. In either case, you will need to call beginInsertRows() and endInsertRows() to notify other components that the model has changed.

See also insertColumns(), removeRows(), beginInsertRows(), and endInsertRows().

pub unsafe fn item_data(
    &self,
    index: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QMapOfIntQVariant>
[src]

Returns a map with values for all predefined roles in the model for the item at the given index.

Calls C++ function: virtual QMap<int, QVariant> QAbstractItemModel::itemData(const QModelIndex& index) const.

C++ documentation:

Returns a map with values for all predefined roles in the model for the item at the given index.

Reimplement this function if you want to extend the default behavior of this function to include custom roles in the map.

See also setItemData(), Qt::ItemDataRole, and data().

pub unsafe fn match_5a(
    &self,
    start: impl CastInto<Ref<QModelIndex>>,
    role: c_int,
    value: impl CastInto<Ref<QVariant>>,
    hits: c_int,
    flags: QFlags<MatchFlag>
) -> CppBox<QListOfQModelIndex>
[src]

Returns a list of indexes for the items in the column of the start index where data stored under the given role matches the specified value. The way the search is performed is defined by the flags given. The list that is returned may be empty. Note also that the order of results in the list may not correspond to the order in the model, if for example a proxy model is used. The order of the results can not be relied upon.

Calls C++ function: virtual QList<QModelIndex> QAbstractItemModel::match(const QModelIndex& start, int role, const QVariant& value, int hits = …, QFlags<Qt::MatchFlag> flags = …) const.

C++ documentation:

Returns a list of indexes for the items in the column of the start index where data stored under the given role matches the specified value. The way the search is performed is defined by the flags given. The list that is returned may be empty. Note also that the order of results in the list may not correspond to the order in the model, if for example a proxy model is used. The order of the results can not be relied upon.

The search begins from the start index, and continues until the number of matching data items equals hits, the search reaches the last row, or the search reaches start again - depending on whether MatchWrap is specified in flags. If you want to search for all matching items, use hits = -1.

By default, this function will perform a wrapping, string-based comparison on all items, searching for items that begin with the search term specified by value.

Note: The default implementation of this function only searches columns. Reimplement this function to include a different search behavior.

pub unsafe fn match_4a(
    &self,
    start: impl CastInto<Ref<QModelIndex>>,
    role: c_int,
    value: impl CastInto<Ref<QVariant>>,
    hits: c_int
) -> CppBox<QListOfQModelIndex>
[src]

Returns a list of indexes for the items in the column of the start index where data stored under the given role matches the specified value. The way the search is performed is defined by the flags given. The list that is returned may be empty. Note also that the order of results in the list may not correspond to the order in the model, if for example a proxy model is used. The order of the results can not be relied upon.

Calls C++ function: virtual QList<QModelIndex> QAbstractItemModel::match(const QModelIndex& start, int role, const QVariant& value, int hits = …) const.

C++ documentation:

Returns a list of indexes for the items in the column of the start index where data stored under the given role matches the specified value. The way the search is performed is defined by the flags given. The list that is returned may be empty. Note also that the order of results in the list may not correspond to the order in the model, if for example a proxy model is used. The order of the results can not be relied upon.

The search begins from the start index, and continues until the number of matching data items equals hits, the search reaches the last row, or the search reaches start again - depending on whether MatchWrap is specified in flags. If you want to search for all matching items, use hits = -1.

By default, this function will perform a wrapping, string-based comparison on all items, searching for items that begin with the search term specified by value.

Note: The default implementation of this function only searches columns. Reimplement this function to include a different search behavior.

pub unsafe fn match_3a(
    &self,
    start: impl CastInto<Ref<QModelIndex>>,
    role: c_int,
    value: impl CastInto<Ref<QVariant>>
) -> CppBox<QListOfQModelIndex>
[src]

Returns a list of indexes for the items in the column of the start index where data stored under the given role matches the specified value. The way the search is performed is defined by the flags given. The list that is returned may be empty. Note also that the order of results in the list may not correspond to the order in the model, if for example a proxy model is used. The order of the results can not be relied upon.

Calls C++ function: virtual QList<QModelIndex> QAbstractItemModel::match(const QModelIndex& start, int role, const QVariant& value) const.

C++ documentation:

Returns a list of indexes for the items in the column of the start index where data stored under the given role matches the specified value. The way the search is performed is defined by the flags given. The list that is returned may be empty. Note also that the order of results in the list may not correspond to the order in the model, if for example a proxy model is used. The order of the results can not be relied upon.

The search begins from the start index, and continues until the number of matching data items equals hits, the search reaches the last row, or the search reaches start again - depending on whether MatchWrap is specified in flags. If you want to search for all matching items, use hits = -1.

By default, this function will perform a wrapping, string-based comparison on all items, searching for items that begin with the search term specified by value.

Note: The default implementation of this function only searches columns. Reimplement this function to include a different search behavior.

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QAbstractItemModel::metaObject() const.

pub unsafe fn mime_data(
    &self,
    indexes: impl CastInto<Ref<QListOfQModelIndex>>
) -> QPtr<QMimeData>
[src]

Returns an object that contains serialized items of data corresponding to the list of indexes specified. The format used to describe the encoded data is obtained from the mimeTypes() function. This default implementation uses the default MIME type returned by the default implementation of mimeTypes(). If you reimplement mimeTypes() in your custom model to return more MIME types, reimplement this function to make use of them.

Calls C++ function: virtual QMimeData* QAbstractItemModel::mimeData(const QList<QModelIndex>& indexes) const.

C++ documentation:

Returns an object that contains serialized items of data corresponding to the list of indexes specified. The format used to describe the encoded data is obtained from the mimeTypes() function. This default implementation uses the default MIME type returned by the default implementation of mimeTypes(). If you reimplement mimeTypes() in your custom model to return more MIME types, reimplement this function to make use of them.

If the list of indexes is empty, or there are no supported MIME types, 0 is returned rather than a serialized empty list.

See also mimeTypes() and dropMimeData().

pub unsafe fn mime_types(&self) -> CppBox<QStringList>[src]

Returns the list of allowed MIME types. By default, the built-in models and views use an internal MIME type: application/x-qabstractitemmodeldatalist.

Calls C++ function: virtual QStringList QAbstractItemModel::mimeTypes() const.

C++ documentation:

Returns the list of allowed MIME types. By default, the built-in models and views use an internal MIME type: application/x-qabstractitemmodeldatalist.

When implementing drag and drop support in a custom model, if you will return data in formats other than the default internal MIME type, reimplement this function to return your list of MIME types.

If you reimplement this function in your custom model, you must also reimplement the member functions that call it: mimeData() and dropMimeData().

See also mimeData() and dropMimeData().

pub unsafe fn move_column(
    &self,
    source_parent: impl CastInto<Ref<QModelIndex>>,
    source_column: c_int,
    destination_parent: impl CastInto<Ref<QModelIndex>>,
    destination_child: c_int
) -> bool
[src]

On models that support this, moves sourceColumn from sourceParent to destinationChild under destinationParent.

Calls C++ function: bool QAbstractItemModel::moveColumn(const QModelIndex& sourceParent, int sourceColumn, const QModelIndex& destinationParent, int destinationChild).

C++ documentation:

On models that support this, moves sourceColumn from sourceParent to destinationChild under destinationParent.

Returns true if the columns were successfully moved; otherwise returns false.

See also moveColumns() and moveRow().

pub unsafe fn move_columns(
    &self,
    source_parent: impl CastInto<Ref<QModelIndex>>,
    source_column: c_int,
    count: c_int,
    destination_parent: impl CastInto<Ref<QModelIndex>>,
    destination_child: c_int
) -> bool
[src]

On models that support this, moves count columns starting with the given sourceColumn under parent sourceParent to column destinationChild under parent destinationParent.

Calls C++ function: virtual bool QAbstractItemModel::moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild).

C++ documentation:

On models that support this, moves count columns starting with the given sourceColumn under parent sourceParent to column destinationChild under parent destinationParent.

Returns true if the columns were successfully moved; otherwise returns false.

The base class implementation does nothing and returns false.

If you implement your own model, you can reimplement this function if you want to support moving. Alternatively, you can provide your own API for altering the data.

See also beginMoveColumns() and endMoveColumns().

pub unsafe fn move_row(
    &self,
    source_parent: impl CastInto<Ref<QModelIndex>>,
    source_row: c_int,
    destination_parent: impl CastInto<Ref<QModelIndex>>,
    destination_child: c_int
) -> bool
[src]

On models that support this, moves sourceRow from sourceParent to destinationChild under destinationParent.

Calls C++ function: bool QAbstractItemModel::moveRow(const QModelIndex& sourceParent, int sourceRow, const QModelIndex& destinationParent, int destinationChild).

C++ documentation:

On models that support this, moves sourceRow from sourceParent to destinationChild under destinationParent.

Returns true if the rows were successfully moved; otherwise returns false.

See also moveRows() and moveColumn().

pub unsafe fn move_rows(
    &self,
    source_parent: impl CastInto<Ref<QModelIndex>>,
    source_row: c_int,
    count: c_int,
    destination_parent: impl CastInto<Ref<QModelIndex>>,
    destination_child: c_int
) -> bool
[src]

On models that support this, moves count rows starting with the given sourceRow under parent sourceParent to row destinationChild under parent destinationParent.

Calls C++ function: virtual bool QAbstractItemModel::moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild).

C++ documentation:

On models that support this, moves count rows starting with the given sourceRow under parent sourceParent to row destinationChild under parent destinationParent.

Returns true if the rows were successfully moved; otherwise returns false.

The base class implementation does nothing and returns false.

If you implement your own model, you can reimplement this function if you want to support moving. Alternatively, you can provide your own API for altering the data.

See also beginMoveRows() and endMoveRows().

pub unsafe fn parent(
    &self,
    child: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QModelIndex>
[src]

Returns the parent of the model item with the given index. If the item has no parent, an invalid QModelIndex is returned.

Calls C++ function: pure virtual QModelIndex QAbstractItemModel::parent(const QModelIndex& child) const.

C++ documentation:

Returns the parent of the model item with the given index. If the item has no parent, an invalid QModelIndex is returned.

A common convention used in models that expose tree data structures is that only items in the first column have children. For that case, when reimplementing this function in a subclass the column of the returned QModelIndex would be 0.

When reimplementing this function in a subclass, be careful to avoid calling QModelIndex member functions, such as QModelIndex::parent(), since indexes belonging to your model will simply call your implementation, leading to infinite recursion.

See also createIndex().

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QAbstractItemModel::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QAbstractItemModel::qt_metacast(const char* arg1).

pub unsafe fn remove_column_2a(
    &self,
    column: c_int,
    parent: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

Removes the given column from the child items of the parent specified.

Calls C++ function: bool QAbstractItemModel::removeColumn(int column, const QModelIndex& parent = …).

C++ documentation:

Removes the given column from the child items of the parent specified.

Returns true if the column is removed; otherwise returns false.

See also removeColumns(), removeRow(), and insertColumn().

pub unsafe fn remove_column_1a(&self, column: c_int) -> bool[src]

Removes the given column from the child items of the parent specified.

Calls C++ function: bool QAbstractItemModel::removeColumn(int column).

C++ documentation:

Removes the given column from the child items of the parent specified.

Returns true if the column is removed; otherwise returns false.

See also removeColumns(), removeRow(), and insertColumn().

pub unsafe fn remove_columns_3a(
    &self,
    column: c_int,
    count: c_int,
    parent: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

On models that support this, removes count columns starting with the given column under parent parent from the model.

Calls C++ function: virtual bool QAbstractItemModel::removeColumns(int column, int count, const QModelIndex& parent = …).

C++ documentation:

On models that support this, removes count columns starting with the given column under parent parent from the model.

Returns true if the columns were successfully removed; otherwise returns false.

The base class implementation does nothing and returns false.

If you implement your own model, you can reimplement this function if you want to support removing. Alternatively, you can provide your own API for altering the data.

See also removeColumn(), removeRows(), insertColumns(), beginRemoveColumns(), and endRemoveColumns().

pub unsafe fn remove_columns_2a(&self, column: c_int, count: c_int) -> bool[src]

On models that support this, removes count columns starting with the given column under parent parent from the model.

Calls C++ function: virtual bool QAbstractItemModel::removeColumns(int column, int count).

C++ documentation:

On models that support this, removes count columns starting with the given column under parent parent from the model.

Returns true if the columns were successfully removed; otherwise returns false.

The base class implementation does nothing and returns false.

If you implement your own model, you can reimplement this function if you want to support removing. Alternatively, you can provide your own API for altering the data.

See also removeColumn(), removeRows(), insertColumns(), beginRemoveColumns(), and endRemoveColumns().

pub unsafe fn remove_row_2a(
    &self,
    row: c_int,
    parent: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

Removes the given row from the child items of the parent specified.

Calls C++ function: bool QAbstractItemModel::removeRow(int row, const QModelIndex& parent = …).

C++ documentation:

Removes the given row from the child items of the parent specified.

Returns true if the row is removed; otherwise returns false.

This is a convenience function that calls removeRows(). The QAbstractItemModel implementation of removeRows() does nothing.

See also removeRows(), removeColumn(), and insertRow().

pub unsafe fn remove_row_1a(&self, row: c_int) -> bool[src]

Removes the given row from the child items of the parent specified.

Calls C++ function: bool QAbstractItemModel::removeRow(int row).

C++ documentation:

Removes the given row from the child items of the parent specified.

Returns true if the row is removed; otherwise returns false.

This is a convenience function that calls removeRows(). The QAbstractItemModel implementation of removeRows() does nothing.

See also removeRows(), removeColumn(), and insertRow().

pub unsafe fn remove_rows_3a(
    &self,
    row: c_int,
    count: c_int,
    parent: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

On models that support this, removes count rows starting with the given row under parent parent from the model.

Calls C++ function: virtual bool QAbstractItemModel::removeRows(int row, int count, const QModelIndex& parent = …).

C++ documentation:

On models that support this, removes count rows starting with the given row under parent parent from the model.

Returns true if the rows were successfully removed; otherwise returns false.

The base class implementation does nothing and returns false.

If you implement your own model, you can reimplement this function if you want to support removing. Alternatively, you can provide your own API for altering the data.

See also removeRow(), removeColumns(), insertColumns(), beginRemoveRows(), and endRemoveRows().

pub unsafe fn remove_rows_2a(&self, row: c_int, count: c_int) -> bool[src]

On models that support this, removes count rows starting with the given row under parent parent from the model.

Calls C++ function: virtual bool QAbstractItemModel::removeRows(int row, int count).

C++ documentation:

On models that support this, removes count rows starting with the given row under parent parent from the model.

Returns true if the rows were successfully removed; otherwise returns false.

The base class implementation does nothing and returns false.

If you implement your own model, you can reimplement this function if you want to support removing. Alternatively, you can provide your own API for altering the data.

See also removeRow(), removeColumns(), insertColumns(), beginRemoveRows(), and endRemoveRows().

pub unsafe fn revert(&self)[src]

Lets the model know that it should discard cached information. This function is typically used for row editing.

Calls C++ function: virtual [slot] void QAbstractItemModel::revert().

C++ documentation:

Lets the model know that it should discard cached information. This function is typically used for row editing.

See also submit().

pub unsafe fn role_names(&self) -> CppBox<QHashOfIntQByteArray>[src]

Returns the model's role names.

Calls C++ function: virtual QHash<int, QByteArray> QAbstractItemModel::roleNames() const.

C++ documentation:

Returns the model's role names.

The default role names set by Qt are:

Qt RoleQML Role Name
Qt::DisplayRoledisplay
Qt::DecorationRoledecoration
Qt::EditRoleedit
Qt::ToolTipRoletoolTip
Qt::StatusTipRolestatusTip
Qt::WhatsThisRolewhatsThis

This function was introduced in Qt 4.6.

See also setRoleNames().

pub unsafe fn row_count_1a(
    &self,
    parent: impl CastInto<Ref<QModelIndex>>
) -> c_int
[src]

Returns the number of rows under the given parent. When the parent is valid it means that rowCount is returning the number of children of parent.

Calls C++ function: pure virtual int QAbstractItemModel::rowCount(const QModelIndex& parent = …) const.

C++ documentation:

Returns the number of rows under the given parent. When the parent is valid it means that rowCount is returning the number of children of parent.

Note: When implementing a table based model, rowCount() should return 0 when the parent is valid.

See also columnCount().

pub unsafe fn row_count_0a(&self) -> c_int[src]

Returns the number of rows under the given parent. When the parent is valid it means that rowCount is returning the number of children of parent.

Calls C++ function: pure virtual int QAbstractItemModel::rowCount() const.

C++ documentation:

Returns the number of rows under the given parent. When the parent is valid it means that rowCount is returning the number of children of parent.

Note: When implementing a table based model, rowCount() should return 0 when the parent is valid.

See also columnCount().

pub unsafe fn set_data_3a(
    &self,
    index: impl CastInto<Ref<QModelIndex>>,
    value: impl CastInto<Ref<QVariant>>,
    role: c_int
) -> bool
[src]

Sets the role data for the item at index to value.

Calls C++ function: virtual bool QAbstractItemModel::setData(const QModelIndex& index, const QVariant& value, int role = …).

C++ documentation:

Sets the role data for the item at index to value.

Returns true if successful; otherwise returns false.

The dataChanged() signal should be emitted if the data was successfully set.

The base class implementation returns false. This function and data() must be reimplemented for editable models.

See also Qt::ItemDataRole, data(), and itemData().

pub unsafe fn set_data_2a(
    &self,
    index: impl CastInto<Ref<QModelIndex>>,
    value: impl CastInto<Ref<QVariant>>
) -> bool
[src]

Sets the role data for the item at index to value.

Calls C++ function: virtual bool QAbstractItemModel::setData(const QModelIndex& index, const QVariant& value).

C++ documentation:

Sets the role data for the item at index to value.

Returns true if successful; otherwise returns false.

The dataChanged() signal should be emitted if the data was successfully set.

The base class implementation returns false. This function and data() must be reimplemented for editable models.

See also Qt::ItemDataRole, data(), and itemData().

pub unsafe fn set_header_data_4a(
    &self,
    section: c_int,
    orientation: Orientation,
    value: impl CastInto<Ref<QVariant>>,
    role: c_int
) -> bool
[src]

Sets the data for the given role and section in the header with the specified orientation to the value supplied.

Calls C++ function: virtual bool QAbstractItemModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role = …).

C++ documentation:

Sets the data for the given role and section in the header with the specified orientation to the value supplied.

Returns true if the header's data was updated; otherwise returns false.

When reimplementing this function, the headerDataChanged() signal must be emitted explicitly.

See also Qt::ItemDataRole and headerData().

pub unsafe fn set_header_data_3a(
    &self,
    section: c_int,
    orientation: Orientation,
    value: impl CastInto<Ref<QVariant>>
) -> bool
[src]

Sets the data for the given role and section in the header with the specified orientation to the value supplied.

Calls C++ function: virtual bool QAbstractItemModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant& value).

C++ documentation:

Sets the data for the given role and section in the header with the specified orientation to the value supplied.

Returns true if the header's data was updated; otherwise returns false.

When reimplementing this function, the headerDataChanged() signal must be emitted explicitly.

See also Qt::ItemDataRole and headerData().

pub unsafe fn set_item_data(
    &self,
    index: impl CastInto<Ref<QModelIndex>>,
    roles: impl CastInto<Ref<QMapOfIntQVariant>>
) -> bool
[src]

Sets the role data for the item at index to the associated value in roles, for every Qt::ItemDataRole.

Calls C++ function: virtual bool QAbstractItemModel::setItemData(const QModelIndex& index, const QMap<int, QVariant>& roles).

C++ documentation:

Sets the role data for the item at index to the associated value in roles, for every Qt::ItemDataRole.

Returns true if successful; otherwise returns false.

Roles that are not in roles will not be modified.

See also setData(), data(), and itemData().

pub unsafe fn sibling(
    &self,
    row: c_int,
    column: c_int,
    idx: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QModelIndex>
[src]

Returns the sibling at row and column for the item at index, or an invalid QModelIndex if there is no sibling at that location.

Calls C++ function: virtual QModelIndex QAbstractItemModel::sibling(int row, int column, const QModelIndex& idx) const.

C++ documentation:

Returns the sibling at row and column for the item at index, or an invalid QModelIndex if there is no sibling at that location.

sibling() is just a convenience function that finds the item's parent, and uses it to retrieve the index of the child item in the specified row and column.

This method can optionally be overridden for implementation-specific optimization.

See also index(), QModelIndex::row(), and QModelIndex::column().

pub unsafe fn sort_2a(&self, column: c_int, order: SortOrder)[src]

Sorts the model by column in the given order.

Calls C++ function: virtual void QAbstractItemModel::sort(int column, Qt::SortOrder order = …).

C++ documentation:

Sorts the model by column in the given order.

The base class implementation does nothing.

pub unsafe fn sort_1a(&self, column: c_int)[src]

Sorts the model by column in the given order.

Calls C++ function: virtual void QAbstractItemModel::sort(int column).

C++ documentation:

Sorts the model by column in the given order.

The base class implementation does nothing.

pub unsafe fn span(
    &self,
    index: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QSize>
[src]

Returns the row and column span of the item represented by index.

Calls C++ function: virtual QSize QAbstractItemModel::span(const QModelIndex& index) const.

C++ documentation:

Returns the row and column span of the item represented by index.

Note: Currently, span is not used.

pub unsafe fn submit(&self) -> bool[src]

Lets the model know that it should submit cached information to permanent storage. This function is typically used for row editing.

Calls C++ function: virtual [slot] bool QAbstractItemModel::submit().

C++ documentation:

Lets the model know that it should submit cached information to permanent storage. This function is typically used for row editing.

Returns true if there is no error; otherwise returns false.

See also revert().

pub unsafe fn supported_drag_actions(&self) -> QFlags<DropAction>[src]

Returns the actions supported by the data in this model.

Calls C++ function: virtual QFlags<Qt::DropAction> QAbstractItemModel::supportedDragActions() const.

C++ documentation:

Returns the actions supported by the data in this model.

The default implementation returns supportedDropActions(). Reimplement this function if you wish to support additional actions.

supportedDragActions() is used by QAbstractItemView::startDrag() as the default values when a drag occurs.

See also setSupportedDragActions(), Qt::DropActions, and Using drag and drop with item views.

pub unsafe fn supported_drop_actions(&self) -> QFlags<DropAction>[src]

Returns the drop actions supported by this model.

Calls C++ function: virtual QFlags<Qt::DropAction> QAbstractItemModel::supportedDropActions() const.

C++ documentation:

Returns the drop actions supported by this model.

The default implementation returns Qt::CopyAction. Reimplement this function if you wish to support additional actions. You must also reimplement the dropMimeData() function to handle the additional operations.

This function was introduced in Qt 4.2.

See also dropMimeData(), Qt::DropActions, and Using drag and drop with item views.

Trait Implementations

impl CppDeletable for QConcatenateTablesProxyModel[src]

unsafe fn delete(&self)[src]

Destroys this proxy model.

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

C++ documentation:

Destroys this proxy model.

impl Deref for QConcatenateTablesProxyModel[src]

type Target = QAbstractItemModel

The resulting type after dereferencing.

fn deref(&self) -> &QAbstractItemModel[src]

Calls C++ function: QAbstractItemModel* static_cast<QAbstractItemModel*>(QConcatenateTablesProxyModel* ptr).

impl DynamicCast<QConcatenateTablesProxyModel> for QAbstractItemModel[src]

unsafe fn dynamic_cast(
    ptr: Ptr<QAbstractItemModel>
) -> Ptr<QConcatenateTablesProxyModel>
[src]

Calls C++ function: QConcatenateTablesProxyModel* dynamic_cast<QConcatenateTablesProxyModel*>(QAbstractItemModel* ptr).

impl DynamicCast<QConcatenateTablesProxyModel> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QConcatenateTablesProxyModel>[src]

Calls C++ function: QConcatenateTablesProxyModel* dynamic_cast<QConcatenateTablesProxyModel*>(QObject* ptr).

impl StaticDowncast<QConcatenateTablesProxyModel> for QAbstractItemModel[src]

unsafe fn static_downcast(
    ptr: Ptr<QAbstractItemModel>
) -> Ptr<QConcatenateTablesProxyModel>
[src]

Calls C++ function: QConcatenateTablesProxyModel* static_cast<QConcatenateTablesProxyModel*>(QAbstractItemModel* ptr).

impl StaticDowncast<QConcatenateTablesProxyModel> for QObject[src]

unsafe fn static_downcast(
    ptr: Ptr<QObject>
) -> Ptr<QConcatenateTablesProxyModel>
[src]

Calls C++ function: QConcatenateTablesProxyModel* static_cast<QConcatenateTablesProxyModel*>(QObject* ptr).

impl StaticUpcast<QAbstractItemModel> for QConcatenateTablesProxyModel[src]

unsafe fn static_upcast(
    ptr: Ptr<QConcatenateTablesProxyModel>
) -> Ptr<QAbstractItemModel>
[src]

Calls C++ function: QAbstractItemModel* static_cast<QAbstractItemModel*>(QConcatenateTablesProxyModel* ptr).

impl StaticUpcast<QObject> for QConcatenateTablesProxyModel[src]

unsafe fn static_upcast(ptr: Ptr<QConcatenateTablesProxyModel>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QConcatenateTablesProxyModel* ptr).

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.