[][src]Struct qt_widgets::QColumnView

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

The QColumnView class provides a model/view implementation of a column view.

C++ class: QColumnView.

C++ documentation:

The QColumnView class provides a model/view implementation of a column view.

QColumnView displays a model in a number of QListViews, one for each hierarchy in the tree. This is sometimes referred to as a cascading list.

The QColumnView class is one of the Model/View Classes and is part of Qt's model/view framework.

QColumnView implements the interfaces defined by the QAbstractItemView class to allow it to display data provided by models derived from the QAbstractItemModel class.

Methods

impl QColumnView[src]

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

This signal is emitted when the preview widget should be updated to provide rich information about index

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

C++ documentation:

This signal is emitted when the preview widget should be updated to provide rich information about index

See also previewWidget().

pub unsafe fn column_widths(&self) -> CppBox<QListOfInt>[src]

Returns a list of the width of all the columns in this view.

Calls C++ function: QList<int> QColumnView::columnWidths() const.

C++ documentation:

Returns a list of the width of all the columns in this view.

See also setColumnWidths().

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

Reimplemented from QAbstractItemView::indexAt().

Calls C++ function: virtual QModelIndex QColumnView::indexAt(const QPoint& point) const.

C++ documentation:

Reimplemented from QAbstractItemView::indexAt().

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

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

pub unsafe fn new_1a(
    parent: impl CastInto<MutPtr<QWidget>>
) -> CppBox<QColumnView>
[src]

Constructs a column view with a parent to represent a model's data. Use setModel() to set the model.

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

C++ documentation:

Constructs a column view with a parent to represent a model's data. Use setModel() to set the model.

See also QAbstractItemModel.

pub unsafe fn new_0a() -> CppBox<QColumnView>[src]

The QColumnView class provides a model/view implementation of a column view.

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

C++ documentation:

The QColumnView class provides a model/view implementation of a column view.

QColumnView displays a model in a number of QListViews, one for each hierarchy in the tree. This is sometimes referred to as a cascading list.

The QColumnView class is one of the Model/View Classes and is part of Qt's model/view framework.

QColumnView implements the interfaces defined by the QAbstractItemView class to allow it to display data provided by models derived from the QAbstractItemModel class.

pub unsafe fn preview_widget(&self) -> MutPtr<QWidget>[src]

Returns the preview widget, or 0 if there is none.

Calls C++ function: QWidget* QColumnView::previewWidget() const.

C++ documentation:

Returns the preview widget, or 0 if there is none.

See also setPreviewWidget() and updatePreviewWidget().

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

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

pub unsafe fn qt_metacast(
    &mut self,
    arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]

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

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

This property holds the way to specify if the list views gets resize grips or not

Calls C++ function: bool QColumnView::resizeGripsVisible() const.

C++ documentation:

This property holds the way to specify if the list views gets resize grips or not

By default, visible is set to true

Access functions:

bool resizeGripsVisible() const
void setResizeGripsVisible(bool visible)

See also setRootIndex().

pub unsafe fn scroll_to_2a(
    &mut self,
    index: impl CastInto<Ref<QModelIndex>>,
    hint: ScrollHint
)
[src]

Reimplemented from QAbstractItemView::scrollTo().

Calls C++ function: virtual void QColumnView::scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint = …).

C++ documentation:

Reimplemented from QAbstractItemView::scrollTo().

pub unsafe fn scroll_to_1a(&mut self, index: impl CastInto<Ref<QModelIndex>>)[src]

Reimplemented from QAbstractItemView::scrollTo().

Calls C++ function: virtual void QColumnView::scrollTo(const QModelIndex& index).

C++ documentation:

Reimplemented from QAbstractItemView::scrollTo().

pub unsafe fn select_all(&mut self)[src]

Reimplemented from QAbstractItemView::selectAll().

Calls C++ function: virtual void QColumnView::selectAll().

C++ documentation:

Reimplemented from QAbstractItemView::selectAll().

pub unsafe fn set_column_widths(&mut self, list: impl CastInto<Ref<QListOfInt>>)[src]

Sets the column widths to the values given in the list. Extra values in the list are kept and used when the columns are created.

Calls C++ function: void QColumnView::setColumnWidths(const QList<int>& list).

C++ documentation:

Sets the column widths to the values given in the list. Extra values in the list are kept and used when the columns are created.

If list contains too few values, only width of the rest of the columns will not be modified.

See also columnWidths() and createColumn().

pub unsafe fn set_model(
    &mut self,
    model: impl CastInto<MutPtr<QAbstractItemModel>>
)
[src]

Reimplemented from QAbstractItemView::setModel().

Calls C++ function: virtual void QColumnView::setModel(QAbstractItemModel* model).

C++ documentation:

Reimplemented from QAbstractItemView::setModel().

pub unsafe fn set_preview_widget(
    &mut self,
    widget: impl CastInto<MutPtr<QWidget>>
)
[src]

Sets the preview widget.

Calls C++ function: void QColumnView::setPreviewWidget(QWidget* widget).

C++ documentation:

Sets the preview widget.

The widget becomes a child of the column view, and will be destroyed when the column area is deleted or when a new widget is set.

See also previewWidget() and updatePreviewWidget().

pub unsafe fn set_resize_grips_visible(&mut self, visible: bool)[src]

This property holds the way to specify if the list views gets resize grips or not

Calls C++ function: void QColumnView::setResizeGripsVisible(bool visible).

C++ documentation:

This property holds the way to specify if the list views gets resize grips or not

By default, visible is set to true

Access functions:

bool resizeGripsVisible() const
void setResizeGripsVisible(bool visible)

See also setRootIndex().

pub unsafe fn set_root_index(&mut self, index: impl CastInto<Ref<QModelIndex>>)[src]

Reimplemented from QAbstractItemView::setRootIndex().

Calls C++ function: virtual void QColumnView::setRootIndex(const QModelIndex& index).

C++ documentation:

Reimplemented from QAbstractItemView::setRootIndex().

pub unsafe fn set_selection_model(
    &mut self,
    selection_model: impl CastInto<MutPtr<QItemSelectionModel>>
)
[src]

Reimplemented from QAbstractItemView::setSelectionModel().

Calls C++ function: virtual void QColumnView::setSelectionModel(QItemSelectionModel* selectionModel).

C++ documentation:

Reimplemented from QAbstractItemView::setSelectionModel().

pub unsafe fn size_hint(&self) -> CppBox<QSize>[src]

Reimplemented from QWidget::sizeHint().

Calls C++ function: virtual QSize QColumnView::sizeHint() const.

C++ documentation:

Reimplemented from QWidget::sizeHint().

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

Returns a reference to the staticMetaObject field.

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

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

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

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

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

Reimplemented from QAbstractItemView::visualRect().

Calls C++ function: virtual QRect QColumnView::visualRect(const QModelIndex& index) const.

C++ documentation:

Reimplemented from QAbstractItemView::visualRect().

Methods from Deref<Target = QAbstractItemView>

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

Reset the internal state of the view.

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

C++ documentation:

Reset the internal state of the view.

Warning: This function will reset open editors, scroll bar positions, selections, etc. Existing changes will not be committed. If you would like to save your changes when resetting the view, you can reimplement this function, commit your changes, and then call the superclass' implementation.

pub fn slot_set_root_index(&self) -> Receiver<(*const QModelIndex,)>[src]

Sets the root item to the item at the given index.

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

C++ documentation:

Sets the root item to the item at the given index.

See also rootIndex().

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

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

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

Selects all items in the view. This function will use the selection behavior set on the view when selecting.

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

C++ documentation:

Selects all items in the view. This function will use the selection behavior set on the view when selecting.

See also setSelection(), selectedIndexes(), and clearSelection().

pub fn slot_edit(&self) -> Receiver<(*const QModelIndex,)>[src]

Starts editing the item corresponding to the given index if it is editable.

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

C++ documentation:

Starts editing the item corresponding to the given index if it is editable.

Note that this function does not change the current index. Since the current index defines the next and previous items to edit, users may find that keyboard navigation does not work as expected. To provide consistent navigation behavior, call setCurrentIndex() before this function with the same model index.

See also QModelIndex::flags().

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

Deselects all selected items. The current index will not be changed.

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

C++ documentation:

Deselects all selected items. The current index will not be changed.

See also setSelection() and selectAll().

pub fn slot_set_current_index(&self) -> Receiver<(*const QModelIndex,)>[src]

Sets the current item to be the item at index.

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

C++ documentation:

Sets the current item to be the item at index.

Unless the current selection mode is NoSelection, the item is also selected. Note that this function also updates the starting position for any new selections the user performs.

To set an item as the current item without selecting it, call

selectionModel()->setCurrentIndex(index, QItemSelectionModel::NoUpdate);

See also currentIndex(), currentChanged(), and selectionMode.

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

Scrolls the view to the top.

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

C++ documentation:

Scrolls the view to the top.

This function was introduced in Qt 4.1.

See also scrollTo() and scrollToBottom().

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

Scrolls the view to the bottom.

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

C++ documentation:

Scrolls the view to the bottom.

This function was introduced in Qt 4.1.

See also scrollTo() and scrollToTop().

pub fn slot_update(&self) -> Receiver<(*const QModelIndex,)>[src]

Updates the area occupied by the given index.

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

C++ documentation:

Updates the area occupied by the given index.

This function was introduced in Qt 4.3.

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

This slot is called when items with the given roles are changed in the model. The changed items are those from topLeft to bottomRight inclusive. If just one item is changed topLeft == bottomRight.

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

C++ documentation:

This slot is called when items with the given roles are changed in the model. The changed items are those from topLeft to bottomRight inclusive. If just one item is changed topLeft == bottomRight.

The roles which have been changed can either be an empty container (meaning everything has changed), or a non-empty container with the subset of roles which have changed.

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

This slot is called when rows are inserted. The new rows are those under the given parent from start to end inclusive. The base class implementation calls fetchMore() on the model to check for more data.

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

C++ documentation:

This slot is called when rows are inserted. The new rows are those under the given parent from start to end inclusive. The base class implementation calls fetchMore() on the model to check for more data.

See also rowsAboutToBeRemoved().

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

This slot is called when rows are about to be removed. The deleted rows are those under the given parent from start to end inclusive.

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

C++ documentation:

This slot is called when rows are about to be removed. The deleted rows are those under the given parent from start to end inclusive.

See also rowsInserted().

pub fn slot_selection_changed(
    &self
) -> Receiver<(*const QItemSelection, *const QItemSelection)>
[src]

This slot is called when the selection is changed. The previous selection (which may be empty), is specified by deselected, and the new selection by selected.

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

C++ documentation:

This slot is called when the selection is changed. The previous selection (which may be empty), is specified by deselected, and the new selection by selected.

See also setSelection().

pub fn slot_current_changed(
    &self
) -> Receiver<(*const QModelIndex, *const QModelIndex)>
[src]

This slot is called when a new item becomes the current item. The previous current item is specified by the previous index, and the new item by the current index.

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

C++ documentation:

This slot is called when a new item becomes the current item. The previous current item is specified by the previous index, and the new item by the current index.

If you want to know about changes to items see the dataChanged() signal.

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

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

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

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

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

Updates the geometry of the child widgets of the view.

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

C++ documentation:

Updates the geometry of the child widgets of the view.

This function was introduced in Qt 4.4.

pub fn slot_vertical_scrollbar_action(&self) -> Receiver<(c_int,)>[src]

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

pub fn slot_horizontal_scrollbar_action(&self) -> Receiver<(c_int,)>[src]

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

pub fn slot_vertical_scrollbar_value_changed(&self) -> Receiver<(c_int,)>[src]

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

pub fn slot_horizontal_scrollbar_value_changed(&self) -> Receiver<(c_int,)>[src]

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

pub fn slot_close_editor(&self) -> Receiver<(*mut QWidget, EndEditHint)>[src]

Closes the given editor, and releases it. The hint is used to specify how the view should respond to the end of the editing operation. For example, the hint may indicate that the next item in the view should be opened for editing.

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

C++ documentation:

Closes the given editor, and releases it. The hint is used to specify how the view should respond to the end of the editing operation. For example, the hint may indicate that the next item in the view should be opened for editing.

See also edit() and commitData().

pub fn slot_commit_data(&self) -> Receiver<(*mut QWidget,)>[src]

Commit the data in the editor to the model.

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

C++ documentation:

Commit the data in the editor to the model.

See also closeEditor().

pub fn slot_editor_destroyed(&self) -> Receiver<(*mut QObject,)>[src]

This function is called when the given editor has been destroyed.

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

C++ documentation:

This function is called when the given editor has been destroyed.

See also closeEditor().

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

This signal is emitted when a mouse button is pressed. The item the mouse was pressed on is specified by index. The signal is only emitted when the index is valid.

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

C++ documentation:

This signal is emitted when a mouse button is pressed. The item the mouse was pressed on is specified by index. The signal is only emitted when the index is valid.

Use the QApplication::mouseButtons() function to get the state of the mouse buttons.

See also activated(), clicked(), doubleClicked(), and entered().

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

This signal is emitted when a mouse button is left-clicked. The item the mouse was clicked on is specified by index. The signal is only emitted when the index is valid.

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

C++ documentation:

This signal is emitted when a mouse button is left-clicked. The item the mouse was clicked on is specified by index. The signal is only emitted when the index is valid.

See also activated(), doubleClicked(), entered(), and pressed().

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

This signal is emitted when a mouse button is double-clicked. The item the mouse was double-clicked on is specified by index. The signal is only emitted when the index is valid.

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

C++ documentation:

This signal is emitted when a mouse button is double-clicked. The item the mouse was double-clicked on is specified by index. The signal is only emitted when the index is valid.

See also clicked() and activated().

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

This signal is emitted when the item specified by index is activated by the user. How to activate items depends on the platform; e.g., by single- or double-clicking the item, or by pressing the Return or Enter key when the item is current.

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

C++ documentation:

This signal is emitted when the item specified by index is activated by the user. How to activate items depends on the platform; e.g., by single- or double-clicking the item, or by pressing the Return or Enter key when the item is current.

See also clicked(), doubleClicked(), entered(), and pressed().

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

This signal is emitted when the mouse cursor enters the item specified by index. Mouse tracking needs to be enabled for this feature to work.

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

C++ documentation:

This signal is emitted when the mouse cursor enters the item specified by index. Mouse tracking needs to be enabled for this feature to work.

See also viewportEntered(), activated(), clicked(), doubleClicked(), and pressed().

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

This signal is emitted when the mouse cursor enters the viewport. Mouse tracking needs to be enabled for this feature to work.

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

C++ documentation:

This signal is emitted when the mouse cursor enters the viewport. Mouse tracking needs to be enabled for this feature to work.

See also entered().

pub fn icon_size_changed(&self) -> Signal<(*const QSize,)>[src]

This property holds the size of items' icons

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

C++ documentation:

This property holds the size of items' icons

Setting this property when the view is visible will cause the items to be laid out again.

Access functions:

QSize iconSize() const
void setIconSize(const QSize &size)

Notifier signal:

void iconSizeChanged(const QSize &size)

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

This property holds whether to draw the background using alternating colors

Calls C++ function: bool QAbstractItemView::alternatingRowColors() const.

C++ documentation:

This property holds whether to draw the background using alternating colors

If this property is true, the item background will be drawn using QPalette::Base and QPalette::AlternateBase; otherwise the background will be drawn using the QPalette::Base color.

By default, this property is false.

Access functions:

bool alternatingRowColors() const
void setAlternatingRowColors(bool enable)

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

This property holds the size of the area when auto scrolling is triggered

Calls C++ function: int QAbstractItemView::autoScrollMargin() const.

C++ documentation:

This property holds the size of the area when auto scrolling is triggered

This property controls the size of the area at the edge of the viewport that triggers autoscrolling. The default value is 16 pixels.

This property was introduced in Qt 4.4.

Access functions:

int autoScrollMargin() const
void setAutoScrollMargin(int margin)

pub unsafe fn clear_selection(&mut self)[src]

Deselects all selected items. The current index will not be changed.

Calls C++ function: [slot] void QAbstractItemView::clearSelection().

C++ documentation:

Deselects all selected items. The current index will not be changed.

See also setSelection() and selectAll().

pub unsafe fn close_persistent_editor(
    &mut self,
    index: impl CastInto<Ref<QModelIndex>>
)
[src]

Closes the persistent editor for the item at the given index.

Calls C++ function: void QAbstractItemView::closePersistentEditor(const QModelIndex& index).

C++ documentation:

Closes the persistent editor for the item at the given index.

See also openPersistentEditor().

pub unsafe fn current_index(&self) -> CppBox<QModelIndex>[src]

Returns the model index of the current item.

Calls C++ function: QModelIndex QAbstractItemView::currentIndex() const.

C++ documentation:

Returns the model index of the current item.

See also setCurrentIndex().

pub unsafe fn default_drop_action(&self) -> DropAction[src]

This property holds the drop action that will be used by default in QAbstractItemView::drag()

Calls C++ function: Qt::DropAction QAbstractItemView::defaultDropAction() const.

C++ documentation:

This property holds the drop action that will be used by default in QAbstractItemView::drag()

If the property is not set, the drop action is CopyAction when the supported actions support CopyAction.

This property was introduced in Qt 4.6.

Access functions:

Qt::DropAction defaultDropAction() const
void setDefaultDropAction(Qt::DropAction dropAction)

See also showDropIndicator and dragDropOverwriteMode.

pub unsafe fn do_items_layout(&mut self)[src]

Calls C++ function: virtual [slot] void QAbstractItemView::doItemsLayout().

pub unsafe fn drag_drop_mode(&self) -> DragDropMode[src]

This property holds the drag and drop event the view will act upon

Calls C++ function: QAbstractItemView::DragDropMode QAbstractItemView::dragDropMode() const.

C++ documentation:

This property holds the drag and drop event the view will act upon

This property was introduced in Qt 4.2.

Access functions:

DragDropMode dragDropMode() const
void setDragDropMode(DragDropMode behavior)

See also showDropIndicator and dragDropOverwriteMode.

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

This property holds the view's drag and drop behavior

Calls C++ function: bool QAbstractItemView::dragDropOverwriteMode() const.

C++ documentation:

This property holds the view's drag and drop behavior

If its value is true, the selected data will overwrite the existing item data when dropped, while moving the data will clear the item. If its value is false, the selected data will be inserted as a new item when the data is dropped. When the data is moved, the item is removed as well.

The default value is false, as in the QListView and QTreeView subclasses. In the QTableView subclass, on the other hand, the property has been set to true.

Note: This is not intended to prevent overwriting of items. The model's implementation of flags() should do that by not returning Qt::ItemIsDropEnabled.

This property was introduced in Qt 4.2.

Access functions:

bool dragDropOverwriteMode() const
void setDragDropOverwriteMode(bool overwrite)

See also dragDropMode.

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

This property holds whether the view supports dragging of its own items

Calls C++ function: bool QAbstractItemView::dragEnabled() const.

C++ documentation:

This property holds whether the view supports dragging of its own items

Access functions:

bool dragEnabled() const
void setDragEnabled(bool enable)

See also showDropIndicator, DragDropMode, dragDropOverwriteMode, and acceptDrops.

pub unsafe fn edit(&mut self, index: impl CastInto<Ref<QModelIndex>>)[src]

Starts editing the item corresponding to the given index if it is editable.

Calls C++ function: [slot] void QAbstractItemView::edit(const QModelIndex& index).

C++ documentation:

Starts editing the item corresponding to the given index if it is editable.

Note that this function does not change the current index. Since the current index defines the next and previous items to edit, users may find that keyboard navigation does not work as expected. To provide consistent navigation behavior, call setCurrentIndex() before this function with the same model index.

See also QModelIndex::flags().

pub unsafe fn edit_triggers(&self) -> QFlags<EditTrigger>[src]

This property holds which actions will initiate item editing

Calls C++ function: QFlags<QAbstractItemView::EditTrigger> QAbstractItemView::editTriggers() const.

C++ documentation:

This property holds which actions will initiate item editing

This property is a selection of flags defined by EditTrigger, combined using the OR operator. The view will only initiate the editing of an item if the action performed is set in this property.

Access functions:

EditTriggers editTriggers() const
void setEditTriggers(EditTriggers triggers)

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

This property holds whether autoscrolling in drag move events is enabled

Calls C++ function: bool QAbstractItemView::hasAutoScroll() const.

C++ documentation:

This property holds whether autoscrolling in drag move events is enabled

If this property is set to true (the default), the QAbstractItemView automatically scrolls the contents of the view if the user drags within 16 pixels of the viewport edge. If the current item changes, then the view will scroll automatically to ensure that the current item is fully visible.

This property only works if the viewport accepts drops. Autoscroll is switched off by setting this property to false.

Access functions:

bool hasAutoScroll() const
void setAutoScroll(bool enable)

pub unsafe fn horizontal_scroll_mode(&self) -> ScrollMode[src]

how the view scrolls its contents in the horizontal direction

Calls C++ function: QAbstractItemView::ScrollMode QAbstractItemView::horizontalScrollMode() const.

C++ documentation:

how the view scrolls its contents in the horizontal direction

This property controls how the view scroll its contents horizontally. Scrolling can be done either per pixel or per item. Its default value comes from the style via the QStyle::SH_ItemView_ScrollMode style hint.

This property was introduced in Qt 4.2.

Access functions:

ScrollMode horizontalScrollMode() const
void setHorizontalScrollMode(ScrollMode mode)
void resetHorizontalScrollMode()

pub unsafe fn icon_size(&self) -> CppBox<QSize>[src]

This property holds the size of items' icons

Calls C++ function: QSize QAbstractItemView::iconSize() const.

C++ documentation:

This property holds the size of items' icons

Setting this property when the view is visible will cause the items to be laid out again.

Access functions:

QSize iconSize() const
void setIconSize(const QSize &size)

Notifier signal:

void iconSizeChanged(const QSize &size)

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

Returns the model index of the item at the viewport coordinates point.

Calls C++ function: pure virtual QModelIndex QAbstractItemView::indexAt(const QPoint& point) const.

C++ documentation:

Returns the model index of the item at the viewport coordinates point.

In the base class this is a pure virtual function.

See also visualRect().

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

Returns the widget for the item at the given index.

Calls C++ function: QWidget* QAbstractItemView::indexWidget(const QModelIndex& index) const.

C++ documentation:

Returns the widget for the item at the given index.

This function was introduced in Qt 4.1.

See also setIndexWidget().

pub unsafe fn input_method_query(
    &self,
    query: InputMethodQuery
) -> CppBox<QVariant>
[src]

Reimplemented from QWidget::inputMethodQuery().

Calls C++ function: virtual QVariant QAbstractItemView::inputMethodQuery(Qt::InputMethodQuery query) const.

C++ documentation:

Reimplemented from QWidget::inputMethodQuery().

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

Returns whether a persistent editor is open for the item at index index.

Calls C++ function: bool QAbstractItemView::isPersistentEditorOpen(const QModelIndex& index) const.

C++ documentation:

Returns whether a persistent editor is open for the item at index index.

This function was introduced in Qt 5.10.

See also openPersistentEditor() and closePersistentEditor().

This item is available if any(cpp_lib_version="5.11.3", cpp_lib_version="5.12.2", cpp_lib_version="5.13.0").

pub unsafe fn item_delegate_0a(&self) -> MutPtr<QAbstractItemDelegate>[src]

Returns the item delegate used by this view and model. This is either one set with setItemDelegate(), or the default one.

Calls C++ function: QAbstractItemDelegate* QAbstractItemView::itemDelegate() const.

C++ documentation:

Returns the item delegate used by this view and model. This is either one set with setItemDelegate(), or the default one.

See also setItemDelegate().

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

Returns the item delegate used by this view and model for the given index.

Calls C++ function: QAbstractItemDelegate* QAbstractItemView::itemDelegate(const QModelIndex& index) const.

C++ documentation:

Returns the item delegate used by this view and model for the given index.

pub unsafe fn item_delegate_for_column(
    &self,
    column: c_int
) -> MutPtr<QAbstractItemDelegate>
[src]

Returns the item delegate used by this view and model for the given column. You can call itemDelegate() to get a pointer to the current delegate for a given index.

Calls C++ function: QAbstractItemDelegate* QAbstractItemView::itemDelegateForColumn(int column) const.

C++ documentation:

Returns the item delegate used by this view and model for the given column. You can call itemDelegate() to get a pointer to the current delegate for a given index.

This function was introduced in Qt 4.2.

See also setItemDelegateForColumn(), itemDelegateForRow(), and itemDelegate().

pub unsafe fn item_delegate_for_row(
    &self,
    row: c_int
) -> MutPtr<QAbstractItemDelegate>
[src]

Returns the item delegate used by this view and model for the given row, or 0 if no delegate has been assigned. You can call itemDelegate() to get a pointer to the current delegate for a given index.

Calls C++ function: QAbstractItemDelegate* QAbstractItemView::itemDelegateForRow(int row) const.

C++ documentation:

Returns the item delegate used by this view and model for the given row, or 0 if no delegate has been assigned. You can call itemDelegate() to get a pointer to the current delegate for a given index.

This function was introduced in Qt 4.2.

See also setItemDelegateForRow(), itemDelegateForColumn(), and setItemDelegate().

Moves to and selects the item best matching the string search. If no item is found nothing happens.

Calls C++ function: virtual void QAbstractItemView::keyboardSearch(const QString& search).

C++ documentation:

Moves to and selects the item best matching the string search. If no item is found nothing happens.

In the default implementation, the search is reset if search is empty, or the time interval since the last search has exceeded QApplication::keyboardInputInterval().

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

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

pub unsafe fn model(&self) -> MutPtr<QAbstractItemModel>[src]

Returns the model that this view is presenting.

Calls C++ function: QAbstractItemModel* QAbstractItemView::model() const.

C++ documentation:

Returns the model that this view is presenting.

See also setModel().

pub unsafe fn open_persistent_editor(
    &mut self,
    index: impl CastInto<Ref<QModelIndex>>
)
[src]

Opens a persistent editor on the item at the given index. If no editor exists, the delegate will create a new editor.

Calls C++ function: void QAbstractItemView::openPersistentEditor(const QModelIndex& index).

C++ documentation:

Opens a persistent editor on the item at the given index. If no editor exists, the delegate will create a new editor.

See also closePersistentEditor().

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

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

pub unsafe fn qt_metacast(
    &mut self,
    arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]

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

pub unsafe fn reset(&mut self)[src]

Reset the internal state of the view.

Calls C++ function: virtual [slot] void QAbstractItemView::reset().

C++ documentation:

Reset the internal state of the view.

Warning: This function will reset open editors, scroll bar positions, selections, etc. Existing changes will not be committed. If you would like to save your changes when resetting the view, you can reimplement this function, commit your changes, and then call the superclass' implementation.

pub unsafe fn reset_horizontal_scroll_mode(&mut self)[src]

how the view scrolls its contents in the horizontal direction

Calls C++ function: void QAbstractItemView::resetHorizontalScrollMode().

C++ documentation:

how the view scrolls its contents in the horizontal direction

This property controls how the view scroll its contents horizontally. Scrolling can be done either per pixel or per item. Its default value comes from the style via the QStyle::SH_ItemView_ScrollMode style hint.

This property was introduced in Qt 4.2.

Access functions:

ScrollMode horizontalScrollMode() const
void setHorizontalScrollMode(ScrollMode mode)
void resetHorizontalScrollMode()

pub unsafe fn reset_vertical_scroll_mode(&mut self)[src]

how the view scrolls its contents in the vertical direction

Calls C++ function: void QAbstractItemView::resetVerticalScrollMode().

C++ documentation:

how the view scrolls its contents in the vertical direction

This property controls how the view scroll its contents vertically. Scrolling can be done either per pixel or per item. Its default value comes from the style via the QStyle::SH_ItemView_ScrollMode style hint.

This property was introduced in Qt 4.2.

Access functions:

ScrollMode verticalScrollMode() const
void setVerticalScrollMode(ScrollMode mode)
void resetVerticalScrollMode()

pub unsafe fn root_index(&self) -> CppBox<QModelIndex>[src]

Returns the model index of the model's root item. The root item is the parent item to the view's toplevel items. The root can be invalid.

Calls C++ function: QModelIndex QAbstractItemView::rootIndex() const.

C++ documentation:

Returns the model index of the model's root item. The root item is the parent item to the view's toplevel items. The root can be invalid.

See also setRootIndex().

pub unsafe fn scroll_to_2a(
    &mut self,
    index: impl CastInto<Ref<QModelIndex>>,
    hint: ScrollHint
)
[src]

Scrolls the view if necessary to ensure that the item at index is visible. The view will try to position the item according to the given hint.

Calls C++ function: pure virtual void QAbstractItemView::scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint = …).

C++ documentation:

Scrolls the view if necessary to ensure that the item at index is visible. The view will try to position the item according to the given hint.

In the base class this is a pure virtual function.

pub unsafe fn scroll_to_1a(&mut self, index: impl CastInto<Ref<QModelIndex>>)[src]

Scrolls the view if necessary to ensure that the item at index is visible. The view will try to position the item according to the given hint.

Calls C++ function: pure virtual void QAbstractItemView::scrollTo(const QModelIndex& index).

C++ documentation:

Scrolls the view if necessary to ensure that the item at index is visible. The view will try to position the item according to the given hint.

In the base class this is a pure virtual function.

pub unsafe fn scroll_to_bottom(&mut self)[src]

Scrolls the view to the bottom.

Calls C++ function: [slot] void QAbstractItemView::scrollToBottom().

C++ documentation:

Scrolls the view to the bottom.

This function was introduced in Qt 4.1.

See also scrollTo() and scrollToTop().

pub unsafe fn scroll_to_top(&mut self)[src]

Scrolls the view to the top.

Calls C++ function: [slot] void QAbstractItemView::scrollToTop().

C++ documentation:

Scrolls the view to the top.

This function was introduced in Qt 4.1.

See also scrollTo() and scrollToBottom().

pub unsafe fn select_all(&mut self)[src]

Selects all items in the view. This function will use the selection behavior set on the view when selecting.

Calls C++ function: virtual [slot] void QAbstractItemView::selectAll().

C++ documentation:

Selects all items in the view. This function will use the selection behavior set on the view when selecting.

See also setSelection(), selectedIndexes(), and clearSelection().

pub unsafe fn selection_behavior(&self) -> SelectionBehavior[src]

This property holds which selection behavior the view uses

Calls C++ function: QAbstractItemView::SelectionBehavior QAbstractItemView::selectionBehavior() const.

C++ documentation:

This property holds which selection behavior the view uses

This property holds whether selections are done in terms of single items, rows or columns.

Access functions:

QAbstractItemView::SelectionBehavior selectionBehavior() const
void setSelectionBehavior(QAbstractItemView::SelectionBehavior behavior)

See also SelectionMode and SelectionBehavior.

pub unsafe fn selection_mode(&self) -> SelectionMode[src]

This property holds which selection mode the view operates in

Calls C++ function: QAbstractItemView::SelectionMode QAbstractItemView::selectionMode() const.

C++ documentation:

This property holds which selection mode the view operates in

This property controls whether the user can select one or many items and, in many-item selections, whether the selection must be a continuous range of items.

Access functions:

QAbstractItemView::SelectionMode selectionMode() const
void setSelectionMode(QAbstractItemView::SelectionMode mode)

See also SelectionMode and SelectionBehavior.

pub unsafe fn selection_model(&self) -> MutPtr<QItemSelectionModel>[src]

Returns the current selection model.

Calls C++ function: QItemSelectionModel* QAbstractItemView::selectionModel() const.

C++ documentation:

Returns the current selection model.

See also setSelectionModel() and selectedIndexes().

pub unsafe fn set_alternating_row_colors(&mut self, enable: bool)[src]

This property holds whether to draw the background using alternating colors

Calls C++ function: void QAbstractItemView::setAlternatingRowColors(bool enable).

C++ documentation:

This property holds whether to draw the background using alternating colors

If this property is true, the item background will be drawn using QPalette::Base and QPalette::AlternateBase; otherwise the background will be drawn using the QPalette::Base color.

By default, this property is false.

Access functions:

bool alternatingRowColors() const
void setAlternatingRowColors(bool enable)

pub unsafe fn set_auto_scroll(&mut self, enable: bool)[src]

This property holds whether autoscrolling in drag move events is enabled

Calls C++ function: void QAbstractItemView::setAutoScroll(bool enable).

C++ documentation:

This property holds whether autoscrolling in drag move events is enabled

If this property is set to true (the default), the QAbstractItemView automatically scrolls the contents of the view if the user drags within 16 pixels of the viewport edge. If the current item changes, then the view will scroll automatically to ensure that the current item is fully visible.

This property only works if the viewport accepts drops. Autoscroll is switched off by setting this property to false.

Access functions:

bool hasAutoScroll() const
void setAutoScroll(bool enable)

pub unsafe fn set_auto_scroll_margin(&mut self, margin: c_int)[src]

This property holds the size of the area when auto scrolling is triggered

Calls C++ function: void QAbstractItemView::setAutoScrollMargin(int margin).

C++ documentation:

This property holds the size of the area when auto scrolling is triggered

This property controls the size of the area at the edge of the viewport that triggers autoscrolling. The default value is 16 pixels.

This property was introduced in Qt 4.4.

Access functions:

int autoScrollMargin() const
void setAutoScrollMargin(int margin)

pub unsafe fn set_current_index(
    &mut self,
    index: impl CastInto<Ref<QModelIndex>>
)
[src]

Sets the current item to be the item at index.

Calls C++ function: [slot] void QAbstractItemView::setCurrentIndex(const QModelIndex& index).

C++ documentation:

Sets the current item to be the item at index.

Unless the current selection mode is NoSelection, the item is also selected. Note that this function also updates the starting position for any new selections the user performs.

To set an item as the current item without selecting it, call

selectionModel()->setCurrentIndex(index, QItemSelectionModel::NoUpdate);

See also currentIndex(), currentChanged(), and selectionMode.

pub unsafe fn set_default_drop_action(&mut self, drop_action: DropAction)[src]

This property holds the drop action that will be used by default in QAbstractItemView::drag()

Calls C++ function: void QAbstractItemView::setDefaultDropAction(Qt::DropAction dropAction).

C++ documentation:

This property holds the drop action that will be used by default in QAbstractItemView::drag()

If the property is not set, the drop action is CopyAction when the supported actions support CopyAction.

This property was introduced in Qt 4.6.

Access functions:

Qt::DropAction defaultDropAction() const
void setDefaultDropAction(Qt::DropAction dropAction)

See also showDropIndicator and dragDropOverwriteMode.

pub unsafe fn set_drag_drop_mode(&mut self, behavior: DragDropMode)[src]

This property holds the drag and drop event the view will act upon

Calls C++ function: void QAbstractItemView::setDragDropMode(QAbstractItemView::DragDropMode behavior).

C++ documentation:

This property holds the drag and drop event the view will act upon

This property was introduced in Qt 4.2.

Access functions:

DragDropMode dragDropMode() const
void setDragDropMode(DragDropMode behavior)

See also showDropIndicator and dragDropOverwriteMode.

pub unsafe fn set_drag_drop_overwrite_mode(&mut self, overwrite: bool)[src]

This property holds the view's drag and drop behavior

Calls C++ function: void QAbstractItemView::setDragDropOverwriteMode(bool overwrite).

C++ documentation:

This property holds the view's drag and drop behavior

If its value is true, the selected data will overwrite the existing item data when dropped, while moving the data will clear the item. If its value is false, the selected data will be inserted as a new item when the data is dropped. When the data is moved, the item is removed as well.

The default value is false, as in the QListView and QTreeView subclasses. In the QTableView subclass, on the other hand, the property has been set to true.

Note: This is not intended to prevent overwriting of items. The model's implementation of flags() should do that by not returning Qt::ItemIsDropEnabled.

This property was introduced in Qt 4.2.

Access functions:

bool dragDropOverwriteMode() const
void setDragDropOverwriteMode(bool overwrite)

See also dragDropMode.

pub unsafe fn set_drag_enabled(&mut self, enable: bool)[src]

This property holds whether the view supports dragging of its own items

Calls C++ function: void QAbstractItemView::setDragEnabled(bool enable).

C++ documentation:

This property holds whether the view supports dragging of its own items

Access functions:

bool dragEnabled() const
void setDragEnabled(bool enable)

See also showDropIndicator, DragDropMode, dragDropOverwriteMode, and acceptDrops.

pub unsafe fn set_drop_indicator_shown(&mut self, enable: bool)[src]

This property holds whether the drop indicator is shown when dragging items and dropping.

Calls C++ function: void QAbstractItemView::setDropIndicatorShown(bool enable).

C++ documentation:

This property holds whether the drop indicator is shown when dragging items and dropping.

Access functions:

bool showDropIndicator() const
void setDropIndicatorShown(bool enable)

See also dragEnabled, DragDropMode, dragDropOverwriteMode, and acceptDrops.

pub unsafe fn set_edit_triggers(&mut self, triggers: QFlags<EditTrigger>)[src]

This property holds which actions will initiate item editing

Calls C++ function: void QAbstractItemView::setEditTriggers(QFlags<QAbstractItemView::EditTrigger> triggers).

C++ documentation:

This property holds which actions will initiate item editing

This property is a selection of flags defined by EditTrigger, combined using the OR operator. The view will only initiate the editing of an item if the action performed is set in this property.

Access functions:

EditTriggers editTriggers() const
void setEditTriggers(EditTriggers triggers)

pub unsafe fn set_horizontal_scroll_mode(&mut self, mode: ScrollMode)[src]

how the view scrolls its contents in the horizontal direction

Calls C++ function: void QAbstractItemView::setHorizontalScrollMode(QAbstractItemView::ScrollMode mode).

C++ documentation:

how the view scrolls its contents in the horizontal direction

This property controls how the view scroll its contents horizontally. Scrolling can be done either per pixel or per item. Its default value comes from the style via the QStyle::SH_ItemView_ScrollMode style hint.

This property was introduced in Qt 4.2.

Access functions:

ScrollMode horizontalScrollMode() const
void setHorizontalScrollMode(ScrollMode mode)
void resetHorizontalScrollMode()

pub unsafe fn set_icon_size(&mut self, size: impl CastInto<Ref<QSize>>)[src]

This property holds the size of items' icons

Calls C++ function: void QAbstractItemView::setIconSize(const QSize& size).

C++ documentation:

This property holds the size of items' icons

Setting this property when the view is visible will cause the items to be laid out again.

Access functions:

QSize iconSize() const
void setIconSize(const QSize &size)

Notifier signal:

void iconSizeChanged(const QSize &size)

pub unsafe fn set_index_widget(
    &mut self,
    index: impl CastInto<Ref<QModelIndex>>,
    widget: impl CastInto<MutPtr<QWidget>>
)
[src]

Sets the given widget on the item at the given index, passing the ownership of the widget to the viewport.

Calls C++ function: void QAbstractItemView::setIndexWidget(const QModelIndex& index, QWidget* widget).

C++ documentation:

Sets the given widget on the item at the given index, passing the ownership of the widget to the viewport.

If index is invalid (e.g., if you pass the root index), this function will do nothing.

The given widget's autoFillBackground property must be set to true, otherwise the widget's background will be transparent, showing both the model data and the item at the given index.

If index widget A is replaced with index widget B, index widget A will be deleted. For example, in the code snippet below, the QLineEdit object will be deleted.

setIndexWidget(index, new QLineEdit); ... setIndexWidget(index, new QTextEdit);

This function should only be used to display static content within the visible area corresponding to an item of data. If you want to display custom dynamic content or implement a custom editor widget, subclass QItemDelegate instead.

This function was introduced in Qt 4.1.

See also indexWidget() and Delegate Classes.

pub unsafe fn set_item_delegate(
    &mut self,
    delegate: impl CastInto<MutPtr<QAbstractItemDelegate>>
)
[src]

Sets the item delegate for this view and its model to delegate. This is useful if you want complete control over the editing and display of items.

Calls C++ function: void QAbstractItemView::setItemDelegate(QAbstractItemDelegate* delegate).

C++ documentation:

Sets the item delegate for this view and its model to delegate. This is useful if you want complete control over the editing and display of items.

Any existing delegate will be removed, but not deleted. QAbstractItemView does not take ownership of delegate.

Warning: You should not share the same instance of a delegate between views. Doing so can cause incorrect or unintuitive editing behavior since each view connected to a given delegate may receive the closeEditor() signal, and attempt to access, modify or close an editor that has already been closed.

See also itemDelegate().

pub unsafe fn set_item_delegate_for_column(
    &mut self,
    column: c_int,
    delegate: impl CastInto<MutPtr<QAbstractItemDelegate>>
)
[src]

Sets the given item delegate used by this view and model for the given column. All items on column will be drawn and managed by delegate instead of using the default delegate (i.e., itemDelegate()).

Calls C++ function: void QAbstractItemView::setItemDelegateForColumn(int column, QAbstractItemDelegate* delegate).

C++ documentation:

Sets the given item delegate used by this view and model for the given column. All items on column will be drawn and managed by delegate instead of using the default delegate (i.e., itemDelegate()).

Any existing column delegate for column will be removed, but not deleted. QAbstractItemView does not take ownership of delegate.

Note: If a delegate has been assigned to both a row and a column, the row delegate will take precedence and manage the intersecting cell index.

Warning: You should not share the same instance of a delegate between views. Doing so can cause incorrect or unintuitive editing behavior since each view connected to a given delegate may receive the closeEditor() signal, and attempt to access, modify or close an editor that has already been closed.

This function was introduced in Qt 4.2.

See also itemDelegateForColumn(), setItemDelegateForRow(), and itemDelegate().

pub unsafe fn set_item_delegate_for_row(
    &mut self,
    row: c_int,
    delegate: impl CastInto<MutPtr<QAbstractItemDelegate>>
)
[src]

Sets the given item delegate used by this view and model for the given row. All items on row will be drawn and managed by delegate instead of using the default delegate (i.e., itemDelegate()).

Calls C++ function: void QAbstractItemView::setItemDelegateForRow(int row, QAbstractItemDelegate* delegate).

C++ documentation:

Sets the given item delegate used by this view and model for the given row. All items on row will be drawn and managed by delegate instead of using the default delegate (i.e., itemDelegate()).

Any existing row delegate for row will be removed, but not deleted. QAbstractItemView does not take ownership of delegate.

Note: If a delegate has been assigned to both a row and a column, the row delegate (i.e., this delegate) will take precedence and manage the intersecting cell index.

Warning: You should not share the same instance of a delegate between views. Doing so can cause incorrect or unintuitive editing behavior since each view connected to a given delegate may receive the closeEditor() signal, and attempt to access, modify or close an editor that has already been closed.

This function was introduced in Qt 4.2.

See also itemDelegateForRow(), setItemDelegateForColumn(), and itemDelegate().

pub unsafe fn set_model(
    &mut self,
    model: impl CastInto<MutPtr<QAbstractItemModel>>
)
[src]

Sets the model for the view to present.

Calls C++ function: virtual void QAbstractItemView::setModel(QAbstractItemModel* model).

C++ documentation:

Sets the model for the view to present.

This function will create and set a new selection model, replacing any model that was previously set with setSelectionModel(). However, the old selection model will not be deleted as it may be shared between several views. We recommend that you delete the old selection model if it is no longer required. This is done with the following code:

QItemSelectionModel *m = view->selectionModel(); view->setModel(new model); delete m;

If both the old model and the old selection model do not have parents, or if their parents are long-lived objects, it may be preferable to call their deleteLater() functions to explicitly delete them.

The view does not take ownership of the model unless it is the model's parent object because the model may be shared between many different views.

See also model(), selectionModel(), and setSelectionModel().

pub unsafe fn set_root_index(&mut self, index: impl CastInto<Ref<QModelIndex>>)[src]

Sets the root item to the item at the given index.

Calls C++ function: virtual [slot] void QAbstractItemView::setRootIndex(const QModelIndex& index).

C++ documentation:

Sets the root item to the item at the given index.

See also rootIndex().

pub unsafe fn set_selection_behavior(&mut self, behavior: SelectionBehavior)[src]

This property holds which selection behavior the view uses

Calls C++ function: void QAbstractItemView::setSelectionBehavior(QAbstractItemView::SelectionBehavior behavior).

C++ documentation:

This property holds which selection behavior the view uses

This property holds whether selections are done in terms of single items, rows or columns.

Access functions:

QAbstractItemView::SelectionBehavior selectionBehavior() const
void setSelectionBehavior(QAbstractItemView::SelectionBehavior behavior)

See also SelectionMode and SelectionBehavior.

pub unsafe fn set_selection_mode(&mut self, mode: SelectionMode)[src]

This property holds which selection mode the view operates in

Calls C++ function: void QAbstractItemView::setSelectionMode(QAbstractItemView::SelectionMode mode).

C++ documentation:

This property holds which selection mode the view operates in

This property controls whether the user can select one or many items and, in many-item selections, whether the selection must be a continuous range of items.

Access functions:

QAbstractItemView::SelectionMode selectionMode() const
void setSelectionMode(QAbstractItemView::SelectionMode mode)

See also SelectionMode and SelectionBehavior.

pub unsafe fn set_selection_model(
    &mut self,
    selection_model: impl CastInto<MutPtr<QItemSelectionModel>>
)
[src]

Sets the current selection model to the given selectionModel.

Calls C++ function: virtual void QAbstractItemView::setSelectionModel(QItemSelectionModel* selectionModel).

C++ documentation:

Sets the current selection model to the given selectionModel.

Note that, if you call setModel() after this function, the given selectionModel will be replaced by one created by the view.

Note: It is up to the application to delete the old selection model if it is no longer needed; i.e., if it is not being used by other views. This will happen automatically when its parent object is deleted. However, if it does not have a parent, or if the parent is a long-lived object, it may be preferable to call its deleteLater() function to explicitly delete it.

See also selectionModel(), setModel(), and clearSelection().

pub unsafe fn set_tab_key_navigation(&mut self, enable: bool)[src]

This property holds whether item navigation with tab and backtab is enabled.

Calls C++ function: void QAbstractItemView::setTabKeyNavigation(bool enable).

C++ documentation:

This property holds whether item navigation with tab and backtab is enabled.

Access functions:

bool tabKeyNavigation() const
void setTabKeyNavigation(bool enable)

pub unsafe fn set_text_elide_mode(&mut self, mode: TextElideMode)[src]

This property holds the position of the "..." in elided text.

Calls C++ function: void QAbstractItemView::setTextElideMode(Qt::TextElideMode mode).

C++ documentation:

This property holds the position of the "..." in elided text.

The default value for all item views is Qt::ElideRight.

Access functions:

Qt::TextElideMode textElideMode() const
void setTextElideMode(Qt::TextElideMode mode)

pub unsafe fn set_vertical_scroll_mode(&mut self, mode: ScrollMode)[src]

how the view scrolls its contents in the vertical direction

Calls C++ function: void QAbstractItemView::setVerticalScrollMode(QAbstractItemView::ScrollMode mode).

C++ documentation:

how the view scrolls its contents in the vertical direction

This property controls how the view scroll its contents vertically. Scrolling can be done either per pixel or per item. Its default value comes from the style via the QStyle::SH_ItemView_ScrollMode style hint.

This property was introduced in Qt 4.2.

Access functions:

ScrollMode verticalScrollMode() const
void setVerticalScrollMode(ScrollMode mode)
void resetVerticalScrollMode()

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

This property holds whether the drop indicator is shown when dragging items and dropping.

Calls C++ function: bool QAbstractItemView::showDropIndicator() const.

C++ documentation:

This property holds whether the drop indicator is shown when dragging items and dropping.

Access functions:

bool showDropIndicator() const
void setDropIndicatorShown(bool enable)

See also dragEnabled, DragDropMode, dragDropOverwriteMode, and acceptDrops.

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

Returns the width size hint for the specified column or -1 if there is no model.

Calls C++ function: virtual int QAbstractItemView::sizeHintForColumn(int column) const.

C++ documentation:

Returns the width size hint for the specified column or -1 if there is no model.

This function is used in views with a horizontal header to find the size hint for a header section based on the contents of the given column.

See also sizeHintForRow().

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

Returns the size hint for the item with the specified index or an invalid size for invalid indexes.

Calls C++ function: QSize QAbstractItemView::sizeHintForIndex(const QModelIndex& index) const.

C++ documentation:

Returns the size hint for the item with the specified index or an invalid size for invalid indexes.

See also sizeHintForRow() and sizeHintForColumn().

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

Returns the height size hint for the specified row or -1 if there is no model.

Calls C++ function: virtual int QAbstractItemView::sizeHintForRow(int row) const.

C++ documentation:

Returns the height size hint for the specified row or -1 if there is no model.

The returned height is calculated using the size hints of the given row's items, i.e. the returned value is the maximum height among the items. Note that to control the height of a row, you must reimplement the QAbstractItemDelegate::sizeHint() function.

This function is used in views with a vertical header to find the size hint for a header section based on the contents of the given row.

See also sizeHintForColumn().

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

This property holds whether item navigation with tab and backtab is enabled.

Calls C++ function: bool QAbstractItemView::tabKeyNavigation() const.

C++ documentation:

This property holds whether item navigation with tab and backtab is enabled.

Access functions:

bool tabKeyNavigation() const
void setTabKeyNavigation(bool enable)

pub unsafe fn text_elide_mode(&self) -> TextElideMode[src]

This property holds the position of the "..." in elided text.

Calls C++ function: Qt::TextElideMode QAbstractItemView::textElideMode() const.

C++ documentation:

This property holds the position of the "..." in elided text.

The default value for all item views is Qt::ElideRight.

Access functions:

Qt::TextElideMode textElideMode() const
void setTextElideMode(Qt::TextElideMode mode)

pub unsafe fn update(&mut self, index: impl CastInto<Ref<QModelIndex>>)[src]

Updates the area occupied by the given index.

Calls C++ function: [slot] void QAbstractItemView::update(const QModelIndex& index).

C++ documentation:

Updates the area occupied by the given index.

This function was introduced in Qt 4.3.

pub unsafe fn vertical_scroll_mode(&self) -> ScrollMode[src]

how the view scrolls its contents in the vertical direction

Calls C++ function: QAbstractItemView::ScrollMode QAbstractItemView::verticalScrollMode() const.

C++ documentation:

how the view scrolls its contents in the vertical direction

This property controls how the view scroll its contents vertically. Scrolling can be done either per pixel or per item. Its default value comes from the style via the QStyle::SH_ItemView_ScrollMode style hint.

This property was introduced in Qt 4.2.

Access functions:

ScrollMode verticalScrollMode() const
void setVerticalScrollMode(ScrollMode mode)
void resetVerticalScrollMode()

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

Returns the rectangle on the viewport occupied by the item at index.

Calls C++ function: pure virtual QRect QAbstractItemView::visualRect(const QModelIndex& index) const.

C++ documentation:

Returns the rectangle on the viewport occupied by the item at index.

If your item is displayed in several areas then visualRect should return the primary area that contains index and not the complete area that index might encompasses, touch or cause drawing.

In the base class this is a pure virtual function.

See also indexAt() and visualRegionForSelection().

Trait Implementations

impl CppDeletable for QColumnView[src]

unsafe fn delete(&mut self)[src]

Destroys the column view.

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

C++ documentation:

Destroys the column view.

impl Deref for QColumnView[src]

type Target = QAbstractItemView

The resulting type after dereferencing.

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

Calls C++ function: QAbstractItemView* static_cast<QAbstractItemView*>(QColumnView* ptr).

impl DerefMut for QColumnView[src]

fn deref_mut(&mut self) -> &mut QAbstractItemView[src]

Calls C++ function: QAbstractItemView* static_cast<QAbstractItemView*>(QColumnView* ptr).

impl DynamicCast<QColumnView> for QAbstractItemView[src]

unsafe fn dynamic_cast(ptr: Ptr<QAbstractItemView>) -> Ptr<QColumnView>[src]

Calls C++ function: QColumnView* dynamic_cast<QColumnView*>(QAbstractItemView* ptr).

unsafe fn dynamic_cast_mut(
    ptr: MutPtr<QAbstractItemView>
) -> MutPtr<QColumnView>
[src]

Calls C++ function: QColumnView* dynamic_cast<QColumnView*>(QAbstractItemView* ptr).

impl DynamicCast<QColumnView> for QAbstractScrollArea[src]

unsafe fn dynamic_cast(ptr: Ptr<QAbstractScrollArea>) -> Ptr<QColumnView>[src]

Calls C++ function: QColumnView* dynamic_cast<QColumnView*>(QAbstractScrollArea* ptr).

unsafe fn dynamic_cast_mut(
    ptr: MutPtr<QAbstractScrollArea>
) -> MutPtr<QColumnView>
[src]

Calls C++ function: QColumnView* dynamic_cast<QColumnView*>(QAbstractScrollArea* ptr).

impl DynamicCast<QColumnView> for QFrame[src]

unsafe fn dynamic_cast(ptr: Ptr<QFrame>) -> Ptr<QColumnView>[src]

Calls C++ function: QColumnView* dynamic_cast<QColumnView*>(QFrame* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QFrame>) -> MutPtr<QColumnView>[src]

Calls C++ function: QColumnView* dynamic_cast<QColumnView*>(QFrame* ptr).

impl DynamicCast<QColumnView> for QWidget[src]

unsafe fn dynamic_cast(ptr: Ptr<QWidget>) -> Ptr<QColumnView>[src]

Calls C++ function: QColumnView* dynamic_cast<QColumnView*>(QWidget* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QWidget>) -> MutPtr<QColumnView>[src]

Calls C++ function: QColumnView* dynamic_cast<QColumnView*>(QWidget* ptr).

impl DynamicCast<QColumnView> for QObject[src]

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

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

unsafe fn dynamic_cast_mut(ptr: MutPtr<QObject>) -> MutPtr<QColumnView>[src]

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

impl DynamicCast<QColumnView> for QPaintDevice[src]

unsafe fn dynamic_cast(ptr: Ptr<QPaintDevice>) -> Ptr<QColumnView>[src]

Calls C++ function: QColumnView* dynamic_cast<QColumnView*>(QPaintDevice* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QPaintDevice>) -> MutPtr<QColumnView>[src]

Calls C++ function: QColumnView* dynamic_cast<QColumnView*>(QPaintDevice* ptr).

impl StaticDowncast<QColumnView> for QAbstractItemView[src]

unsafe fn static_downcast(ptr: Ptr<QAbstractItemView>) -> Ptr<QColumnView>[src]

Calls C++ function: QColumnView* static_cast<QColumnView*>(QAbstractItemView* ptr).

unsafe fn static_downcast_mut(
    ptr: MutPtr<QAbstractItemView>
) -> MutPtr<QColumnView>
[src]

Calls C++ function: QColumnView* static_cast<QColumnView*>(QAbstractItemView* ptr).

impl StaticDowncast<QColumnView> for QAbstractScrollArea[src]

unsafe fn static_downcast(ptr: Ptr<QAbstractScrollArea>) -> Ptr<QColumnView>[src]

Calls C++ function: QColumnView* static_cast<QColumnView*>(QAbstractScrollArea* ptr).

unsafe fn static_downcast_mut(
    ptr: MutPtr<QAbstractScrollArea>
) -> MutPtr<QColumnView>
[src]

Calls C++ function: QColumnView* static_cast<QColumnView*>(QAbstractScrollArea* ptr).

impl StaticDowncast<QColumnView> for QFrame[src]

unsafe fn static_downcast(ptr: Ptr<QFrame>) -> Ptr<QColumnView>[src]

Calls C++ function: QColumnView* static_cast<QColumnView*>(QFrame* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QFrame>) -> MutPtr<QColumnView>[src]

Calls C++ function: QColumnView* static_cast<QColumnView*>(QFrame* ptr).

impl StaticDowncast<QColumnView> for QWidget[src]

unsafe fn static_downcast(ptr: Ptr<QWidget>) -> Ptr<QColumnView>[src]

Calls C++ function: QColumnView* static_cast<QColumnView*>(QWidget* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QWidget>) -> MutPtr<QColumnView>[src]

Calls C++ function: QColumnView* static_cast<QColumnView*>(QWidget* ptr).

impl StaticDowncast<QColumnView> for QObject[src]

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

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

unsafe fn static_downcast_mut(ptr: MutPtr<QObject>) -> MutPtr<QColumnView>[src]

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

impl StaticDowncast<QColumnView> for QPaintDevice[src]

unsafe fn static_downcast(ptr: Ptr<QPaintDevice>) -> Ptr<QColumnView>[src]

Calls C++ function: QColumnView* static_cast<QColumnView*>(QPaintDevice* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QPaintDevice>) -> MutPtr<QColumnView>[src]

Calls C++ function: QColumnView* static_cast<QColumnView*>(QPaintDevice* ptr).

impl StaticUpcast<QAbstractItemView> for QColumnView[src]

unsafe fn static_upcast(ptr: Ptr<QColumnView>) -> Ptr<QAbstractItemView>[src]

Calls C++ function: QAbstractItemView* static_cast<QAbstractItemView*>(QColumnView* ptr).

unsafe fn static_upcast_mut(
    ptr: MutPtr<QColumnView>
) -> MutPtr<QAbstractItemView>
[src]

Calls C++ function: QAbstractItemView* static_cast<QAbstractItemView*>(QColumnView* ptr).

impl StaticUpcast<QAbstractScrollArea> for QColumnView[src]

unsafe fn static_upcast(ptr: Ptr<QColumnView>) -> Ptr<QAbstractScrollArea>[src]

Calls C++ function: QAbstractScrollArea* static_cast<QAbstractScrollArea*>(QColumnView* ptr).

unsafe fn static_upcast_mut(
    ptr: MutPtr<QColumnView>
) -> MutPtr<QAbstractScrollArea>
[src]

Calls C++ function: QAbstractScrollArea* static_cast<QAbstractScrollArea*>(QColumnView* ptr).

impl StaticUpcast<QFrame> for QColumnView[src]

unsafe fn static_upcast(ptr: Ptr<QColumnView>) -> Ptr<QFrame>[src]

Calls C++ function: QFrame* static_cast<QFrame*>(QColumnView* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QColumnView>) -> MutPtr<QFrame>[src]

Calls C++ function: QFrame* static_cast<QFrame*>(QColumnView* ptr).

impl StaticUpcast<QObject> for QColumnView[src]

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

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

unsafe fn static_upcast_mut(ptr: MutPtr<QColumnView>) -> MutPtr<QObject>[src]

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

impl StaticUpcast<QPaintDevice> for QColumnView[src]

unsafe fn static_upcast(ptr: Ptr<QColumnView>) -> Ptr<QPaintDevice>[src]

Calls C++ function: QPaintDevice* static_cast<QPaintDevice*>(QColumnView* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QColumnView>) -> MutPtr<QPaintDevice>[src]

Calls C++ function: QPaintDevice* static_cast<QPaintDevice*>(QColumnView* ptr).

impl StaticUpcast<QWidget> for QColumnView[src]

unsafe fn static_upcast(ptr: Ptr<QColumnView>) -> Ptr<QWidget>[src]

Calls C++ function: QWidget* static_cast<QWidget*>(QColumnView* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QColumnView>) -> MutPtr<QWidget>[src]

Calls C++ function: QWidget* static_cast<QWidget*>(QColumnView* 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.