[−][src]Struct qt_widgets::QUndoView
The QUndoView class displays the contents of a QUndoStack.
C++ class: QUndoView
.
The QUndoView class displays the contents of a QUndoStack.
QUndoView is a QListView which displays the list of commands pushed on an undo stack. The most recently executed command is always selected. Selecting a different command results in a call to QUndoStack::setIndex(), rolling the state of the document backwards or forward to the new command.
The stack can be set explicitly with setStack(). Alternatively, a QUndoGroup object can be set with setGroup(). The view will then update itself automatically whenever the active stack of the group changes.
Methods
impl QUndoView
[src]
pub fn slot_set_stack(&self) -> Receiver<(*mut QUndoStack,)>
[src]
Sets the stack displayed by this view to stack. If stack is 0, the view will be empty.
Returns a built-in Qt slot QUndoView::setStack
that can be passed to qt_core::Signal::connect
.
Sets the stack displayed by this view to stack. If stack is 0, the view will be empty.
If the view was previously looking at a QUndoGroup, the group is set to 0.
pub fn slot_set_group(&self) -> Receiver<(*mut QUndoGroup,)>
[src]
Sets the group displayed by this view to group. If group is 0, the view will be empty.
Returns a built-in Qt slot QUndoView::setGroup
that can be passed to qt_core::Signal::connect
.
pub unsafe fn clean_icon(&self) -> CppBox<QIcon>
[src]
This property holds the icon used to represent the clean state.
Calls C++ function: QIcon QUndoView::cleanIcon() const
.
This property holds the icon used to represent the clean state.
A stack may have a clean state set with QUndoStack::setClean(). This is usually the state of the document at the point it was saved. QUndoView can display an icon in the list of commands to show the clean state. If this property is a null icon, no icon is shown. The default value is the null icon.
Access functions:
QIcon | cleanIcon() const |
void | setCleanIcon(const QIcon &icon) |
pub unsafe fn empty_label(&self) -> CppBox<QString>
[src]
This property holds the label used for the empty state.
Calls C++ function: QString QUndoView::emptyLabel() const
.
This property holds the label used for the empty state.
The empty label is the topmost element in the list of commands, which represents the state of the document before any commands were pushed on the stack. The default is the string "<empty>".
Access functions:
QString | emptyLabel() const |
void | setEmptyLabel(const QString &label) |
pub unsafe fn group(&self) -> QPtr<QUndoGroup>
[src]
Returns the group displayed by this view.
Calls C++ function: QUndoGroup* QUndoView::group() const
.
pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>
[src]
Calls C++ function: virtual const QMetaObject* QUndoView::metaObject() const
.
pub unsafe fn from_q_widget(
parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QUndoView>
[src]
parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QUndoView>
Constructs a new view with parent parent.
Calls C++ function: [constructor] void QUndoView::QUndoView(QWidget* parent = …)
.
Constructs a new view with parent parent.
pub unsafe fn from_q_undo_stack_q_widget(
stack: impl CastInto<Ptr<QUndoStack>>,
parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QUndoView>
[src]
stack: impl CastInto<Ptr<QUndoStack>>,
parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QUndoView>
Constructs a new view with parent parent and sets the observed stack to stack.
Calls C++ function: [constructor] void QUndoView::QUndoView(QUndoStack* stack, QWidget* parent = …)
.
Constructs a new view with parent parent and sets the observed stack to stack.
pub unsafe fn from_q_undo_group_q_widget(
group: impl CastInto<Ptr<QUndoGroup>>,
parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QUndoView>
[src]
group: impl CastInto<Ptr<QUndoGroup>>,
parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QUndoView>
Constructs a new view with parent parent and sets the observed group to group.
Calls C++ function: [constructor] void QUndoView::QUndoView(QUndoGroup* group, QWidget* parent = …)
.
Constructs a new view with parent parent and sets the observed group to group.
The view will update itself autmiatically whenever the active stack of the group changes.
pub unsafe fn new() -> QBox<QUndoView>
[src]
The QUndoView class displays the contents of a QUndoStack.
Calls C++ function: [constructor] void QUndoView::QUndoView()
.
The QUndoView class displays the contents of a QUndoStack.
QUndoView is a QListView which displays the list of commands pushed on an undo stack. The most recently executed command is always selected. Selecting a different command results in a call to QUndoStack::setIndex(), rolling the state of the document backwards or forward to the new command.
The stack can be set explicitly with setStack(). Alternatively, a QUndoGroup object can be set with setGroup(). The view will then update itself automatically whenever the active stack of the group changes.
pub unsafe fn from_q_undo_stack(
stack: impl CastInto<Ptr<QUndoStack>>
) -> QBox<QUndoView>
[src]
stack: impl CastInto<Ptr<QUndoStack>>
) -> QBox<QUndoView>
Constructs a new view with parent parent and sets the observed stack to stack.
Calls C++ function: [constructor] void QUndoView::QUndoView(QUndoStack* stack)
.
Constructs a new view with parent parent and sets the observed stack to stack.
pub unsafe fn from_q_undo_group(
group: impl CastInto<Ptr<QUndoGroup>>
) -> QBox<QUndoView>
[src]
group: impl CastInto<Ptr<QUndoGroup>>
) -> QBox<QUndoView>
Constructs a new view with parent parent and sets the observed group to group.
Calls C++ function: [constructor] void QUndoView::QUndoView(QUndoGroup* group)
.
Constructs a new view with parent parent and sets the observed group to group.
The view will update itself autmiatically whenever the active stack of the group changes.
pub unsafe fn qt_metacall(
&self,
arg1: Call,
arg2: c_int,
arg3: *mut *mut c_void
) -> c_int
[src]
&self,
arg1: Call,
arg2: c_int,
arg3: *mut *mut c_void
) -> c_int
Calls C++ function: virtual int QUndoView::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* QUndoView::qt_metacast(const char* arg1)
.
pub unsafe fn set_clean_icon(&self, icon: impl CastInto<Ref<QIcon>>)
[src]
This property holds the icon used to represent the clean state.
Calls C++ function: void QUndoView::setCleanIcon(const QIcon& icon)
.
This property holds the icon used to represent the clean state.
A stack may have a clean state set with QUndoStack::setClean(). This is usually the state of the document at the point it was saved. QUndoView can display an icon in the list of commands to show the clean state. If this property is a null icon, no icon is shown. The default value is the null icon.
Access functions:
QIcon | cleanIcon() const |
void | setCleanIcon(const QIcon &icon) |
pub unsafe fn set_empty_label(&self, label: impl CastInto<Ref<QString>>)
[src]
This property holds the label used for the empty state.
Calls C++ function: void QUndoView::setEmptyLabel(const QString& label)
.
This property holds the label used for the empty state.
The empty label is the topmost element in the list of commands, which represents the state of the document before any commands were pushed on the stack. The default is the string "<empty>".
Access functions:
QString | emptyLabel() const |
void | setEmptyLabel(const QString &label) |
pub unsafe fn set_group(&self, group: impl CastInto<Ptr<QUndoGroup>>)
[src]
Sets the group displayed by this view to group. If group is 0, the view will be empty.
Calls C++ function: [slot] void QUndoView::setGroup(QUndoGroup* group)
.
pub unsafe fn set_stack(&self, stack: impl CastInto<Ptr<QUndoStack>>)
[src]
Sets the stack displayed by this view to stack. If stack is 0, the view will be empty.
Calls C++ function: [slot] void QUndoView::setStack(QUndoStack* stack)
.
Sets the stack displayed by this view to stack. If stack is 0, the view will be empty.
If the view was previously looking at a QUndoGroup, the group is set to 0.
pub unsafe fn stack(&self) -> QPtr<QUndoStack>
[src]
Returns the stack currently displayed by this view. If the view is looking at a QUndoGroup, this the group's active stack.
Calls C++ function: QUndoStack* QUndoView::stack() const
.
Returns the stack currently displayed by this view. If the view is looking at a QUndoGroup, this the group's active stack.
pub unsafe fn static_meta_object() -> Ref<QMetaObject>
[src]
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]
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString QUndoView::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]
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString QUndoView::trUtf8(const char* s, const char* c, int n)
.
Methods from Deref<Target = QListView>
pub fn indexes_moved(&self) -> Signal<(*const QListOfQModelIndex,)>
[src]
This signal is emitted when the specified indexes are moved in the view.
Returns a built-in Qt signal QListView::indexesMoved
that can be passed to qt_core::Signal::connect
.
This signal is emitted when the specified indexes are moved in the view.
This function was introduced in Qt 4.2.
pub unsafe fn batch_size(&self) -> c_int
[src]
This property holds the number of items laid out in each batch if layoutMode is set to Batched
Calls C++ function: int QListView::batchSize() const
.
This property holds the number of items laid out in each batch if layoutMode is set to Batched
The default value is 100.
This property was introduced in Qt 4.2.
Access functions:
int | batchSize() const |
void | setBatchSize(int batchSize) |
pub unsafe fn clear_property_flags(&self)
[src]
Clears the QListView-specific property flags. See viewMode.
Calls C++ function: void QListView::clearPropertyFlags()
.
Clears the QListView-specific property flags. See viewMode.
Properties inherited from QAbstractItemView are not covered by the property flags. Specifically, dragEnabled and acceptsDrops are computed by QListView when calling setMovement() or setViewMode().
pub unsafe fn do_items_layout(&self)
[src]
Calls C++ function: virtual void QListView::doItemsLayout()
.
pub unsafe fn flow(&self) -> Flow
[src]
This property holds which direction the items layout should flow.
Calls C++ function: QListView::Flow QListView::flow() const
.
This property holds which direction the items layout should flow.
If this property is LeftToRight, the items will be laid out left to right. If the isWrapping property is true
, the layout will wrap when it reaches the right side of the visible area. If this property is TopToBottom, the items will be laid out from the top of the visible area, wrapping when it reaches the bottom.
Setting this property when the view is visible will cause the items to be laid out again.
By default, this property is set to TopToBottom.
Access functions:
Flow | flow() const |
void | setFlow(Flow flow) |
See also viewMode.
pub unsafe fn grid_size(&self) -> CppBox<QSize>
[src]
This property holds the size of the layout grid
Calls C++ function: QSize QListView::gridSize() const
.
This property holds the size of the layout grid
This property is the size of the grid in which the items are laid out. The default is an empty size which means that there is no grid and the layout is not done in a grid. Setting this property to a non-empty size switches on the grid layout. (When a grid layout is in force the spacing property is ignored.)
Setting this property when the view is visible will cause the items to be laid out again.
Access functions:
QSize | gridSize() const |
void | setGridSize(const QSize &size) |
See also viewMode.
pub unsafe fn index_at(
&self,
p: impl CastInto<Ref<QPoint>>
) -> CppBox<QModelIndex>
[src]
&self,
p: impl CastInto<Ref<QPoint>>
) -> CppBox<QModelIndex>
Reimplemented from QAbstractItemView::indexAt().
Calls C++ function: virtual QModelIndex QListView::indexAt(const QPoint& p) const
.
Reimplemented from QAbstractItemView::indexAt().
[src]
Returns true
if the row is hidden; otherwise returns false
.
Calls C++ function: bool QListView::isRowHidden(int row) const
.
Returns true
if the row is hidden; otherwise returns false
.
pub unsafe fn is_selection_rect_visible(&self) -> bool
[src]
if the selection rectangle should be visible
Calls C++ function: bool QListView::isSelectionRectVisible() const
.
if the selection rectangle should be visible
If this property is true
then the selection rectangle is visible; otherwise it will be hidden.
Note: The selection rectangle will only be visible if the selection mode is in a mode where more than one item can be selected; i.e., it will not draw a selection rectangle if the selection mode is QAbstractItemView::SingleSelection.
By default, this property is false
.
This property was introduced in Qt 4.3.
Access functions:
bool | isSelectionRectVisible() const |
void | setSelectionRectVisible(bool show) |
pub unsafe fn is_wrapping(&self) -> bool
[src]
This property holds whether the items layout should wrap.
Calls C++ function: bool QListView::isWrapping() const
.
This property holds whether the items layout should wrap.
This property holds whether the layout should wrap when there is no more space in the visible area. The point at which the layout wraps depends on the flow property.
Setting this property when the view is visible will cause the items to be laid out again.
By default, this property is false
.
Access functions:
bool | isWrapping() const |
void | setWrapping(bool enable) |
See also viewMode.
pub unsafe fn item_alignment(&self) -> QFlags<AlignmentFlag>
[src]
cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.This property holds the alignment of each item in its cell
Calls C++ function: QFlags<Qt::AlignmentFlag> QListView::itemAlignment() const
.
This property holds the alignment of each item in its cell
This is only supported in ListMode with TopToBottom flow and with wrapping enabled. The default alignment is 0, which means that an item fills its cell entirely.
This property was introduced in Qt 5.12.
Access functions:
Qt::Alignment | itemAlignment() const |
void | setItemAlignment(Qt::Alignment alignment) |
pub unsafe fn layout_mode(&self) -> LayoutMode
[src]
determines whether the layout of items should happen immediately or be delayed.
Calls C++ function: QListView::LayoutMode QListView::layoutMode() const
.
determines whether the layout of items should happen immediately or be delayed.
This property holds the layout mode for the items. When the mode is SinglePass (the default), the items are laid out all in one go. When the mode is Batched, the items are laid out in batches of batchSize items, while processing events. This makes it possible to instantly view and interact with the visible items while the rest are being laid out.
Access functions:
LayoutMode | layoutMode() const |
void | setLayoutMode(LayoutMode mode) |
See also viewMode.
pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>
[src]
Calls C++ function: virtual const QMetaObject* QListView::metaObject() const
.
pub unsafe fn model_column(&self) -> c_int
[src]
This property holds the column in the model that is visible
Calls C++ function: int QListView::modelColumn() const
.
This property holds the column in the model that is visible
By default, this property contains 0, indicating that the first column in the model will be shown.
Access functions:
int | modelColumn() const |
void | setModelColumn(int column) |
pub unsafe fn movement(&self) -> Movement
[src]
This property holds whether the items can be moved freely, are snapped to a grid, or cannot be moved at all.
Calls C++ function: QListView::Movement QListView::movement() const
.
This property holds whether the items can be moved freely, are snapped to a grid, or cannot be moved at all.
This property determines how the user can move the items in the view. Static means that the items can't be moved the user. Free means that the user can drag and drop the items to any position in the view. Snap means that the user can drag and drop the items, but only to the positions in a notional grid signified by the gridSize property.
Setting this property when the view is visible will cause the items to be laid out again.
By default, this property is set to Static.
Access functions:
Movement | movement() const |
void | setMovement(Movement movement) |
See also gridSize, resizeMode, and viewMode.
pub unsafe fn qt_metacall(
&self,
arg1: Call,
arg2: c_int,
arg3: *mut *mut c_void
) -> c_int
[src]
&self,
arg1: Call,
arg2: c_int,
arg3: *mut *mut c_void
) -> c_int
Calls C++ function: virtual int QListView::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* QListView::qt_metacast(const char* arg1)
.
pub unsafe fn reset(&self)
[src]
Calls C++ function: virtual void QListView::reset()
.
pub unsafe fn resize_mode(&self) -> ResizeMode
[src]
This property holds whether the items are laid out again when the view is resized.
Calls C++ function: QListView::ResizeMode QListView::resizeMode() const
.
This property holds whether the items are laid out again when the view is resized.
If this property is Adjust, the items will be laid out again when the view is resized. If the value is Fixed, the items will not be laid out when the view is resized.
By default, this property is set to Fixed.
Access functions:
ResizeMode | resizeMode() const |
void | setResizeMode(ResizeMode mode) |
pub unsafe fn scroll_to_2a(
&self,
index: impl CastInto<Ref<QModelIndex>>,
hint: ScrollHint
)
[src]
&self,
index: impl CastInto<Ref<QModelIndex>>,
hint: ScrollHint
)
Reimplemented from QAbstractItemView::scrollTo().
Calls C++ function: virtual void QListView::scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint = …)
.
Reimplemented from QAbstractItemView::scrollTo().
pub unsafe fn scroll_to_1a(&self, index: impl CastInto<Ref<QModelIndex>>)
[src]
Reimplemented from QAbstractItemView::scrollTo().
Calls C++ function: virtual void QListView::scrollTo(const QModelIndex& index)
.
Reimplemented from QAbstractItemView::scrollTo().
pub unsafe fn set_batch_size(&self, batch_size: c_int)
[src]
This property holds the number of items laid out in each batch if layoutMode is set to Batched
Calls C++ function: void QListView::setBatchSize(int batchSize)
.
This property holds the number of items laid out in each batch if layoutMode is set to Batched
The default value is 100.
This property was introduced in Qt 4.2.
Access functions:
int | batchSize() const |
void | setBatchSize(int batchSize) |
pub unsafe fn set_flow(&self, flow: Flow)
[src]
This property holds which direction the items layout should flow.
Calls C++ function: void QListView::setFlow(QListView::Flow flow)
.
This property holds which direction the items layout should flow.
If this property is LeftToRight, the items will be laid out left to right. If the isWrapping property is true
, the layout will wrap when it reaches the right side of the visible area. If this property is TopToBottom, the items will be laid out from the top of the visible area, wrapping when it reaches the bottom.
Setting this property when the view is visible will cause the items to be laid out again.
By default, this property is set to TopToBottom.
Access functions:
Flow | flow() const |
void | setFlow(Flow flow) |
See also viewMode.
pub unsafe fn set_grid_size(&self, size: impl CastInto<Ref<QSize>>)
[src]
This property holds the size of the layout grid
Calls C++ function: void QListView::setGridSize(const QSize& size)
.
This property holds the size of the layout grid
This property is the size of the grid in which the items are laid out. The default is an empty size which means that there is no grid and the layout is not done in a grid. Setting this property to a non-empty size switches on the grid layout. (When a grid layout is in force the spacing property is ignored.)
Setting this property when the view is visible will cause the items to be laid out again.
Access functions:
QSize | gridSize() const |
void | setGridSize(const QSize &size) |
See also viewMode.
pub unsafe fn set_item_alignment(&self, alignment: QFlags<AlignmentFlag>)
[src]
cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.This property holds the alignment of each item in its cell
Calls C++ function: void QListView::setItemAlignment(QFlags<Qt::AlignmentFlag> alignment)
.
This property holds the alignment of each item in its cell
This is only supported in ListMode with TopToBottom flow and with wrapping enabled. The default alignment is 0, which means that an item fills its cell entirely.
This property was introduced in Qt 5.12.
Access functions:
Qt::Alignment | itemAlignment() const |
void | setItemAlignment(Qt::Alignment alignment) |
pub unsafe fn set_layout_mode(&self, mode: LayoutMode)
[src]
determines whether the layout of items should happen immediately or be delayed.
Calls C++ function: void QListView::setLayoutMode(QListView::LayoutMode mode)
.
determines whether the layout of items should happen immediately or be delayed.
This property holds the layout mode for the items. When the mode is SinglePass (the default), the items are laid out all in one go. When the mode is Batched, the items are laid out in batches of batchSize items, while processing events. This makes it possible to instantly view and interact with the visible items while the rest are being laid out.
Access functions:
LayoutMode | layoutMode() const |
void | setLayoutMode(LayoutMode mode) |
See also viewMode.
pub unsafe fn set_model_column(&self, column: c_int)
[src]
This property holds the column in the model that is visible
Calls C++ function: void QListView::setModelColumn(int column)
.
This property holds the column in the model that is visible
By default, this property contains 0, indicating that the first column in the model will be shown.
Access functions:
int | modelColumn() const |
void | setModelColumn(int column) |
pub unsafe fn set_movement(&self, movement: Movement)
[src]
This property holds whether the items can be moved freely, are snapped to a grid, or cannot be moved at all.
Calls C++ function: void QListView::setMovement(QListView::Movement movement)
.
This property holds whether the items can be moved freely, are snapped to a grid, or cannot be moved at all.
This property determines how the user can move the items in the view. Static means that the items can't be moved the user. Free means that the user can drag and drop the items to any position in the view. Snap means that the user can drag and drop the items, but only to the positions in a notional grid signified by the gridSize property.
Setting this property when the view is visible will cause the items to be laid out again.
By default, this property is set to Static.
Access functions:
Movement | movement() const |
void | setMovement(Movement movement) |
See also gridSize, resizeMode, and viewMode.
pub unsafe fn set_resize_mode(&self, mode: ResizeMode)
[src]
This property holds whether the items are laid out again when the view is resized.
Calls C++ function: void QListView::setResizeMode(QListView::ResizeMode mode)
.
This property holds whether the items are laid out again when the view is resized.
If this property is Adjust, the items will be laid out again when the view is resized. If the value is Fixed, the items will not be laid out when the view is resized.
By default, this property is set to Fixed.
Access functions:
ResizeMode | resizeMode() const |
void | setResizeMode(ResizeMode mode) |
pub unsafe fn set_root_index(&self, index: impl CastInto<Ref<QModelIndex>>)
[src]
Calls C++ function: virtual void QListView::setRootIndex(const QModelIndex& index)
.
[src]
If hide is true, the given row will be hidden; otherwise the row will be shown.
Calls C++ function: void QListView::setRowHidden(int row, bool hide)
.
If hide is true, the given row will be hidden; otherwise the row will be shown.
See also isRowHidden().
pub unsafe fn set_selection_rect_visible(&self, show: bool)
[src]
if the selection rectangle should be visible
Calls C++ function: void QListView::setSelectionRectVisible(bool show)
.
if the selection rectangle should be visible
If this property is true
then the selection rectangle is visible; otherwise it will be hidden.
Note: The selection rectangle will only be visible if the selection mode is in a mode where more than one item can be selected; i.e., it will not draw a selection rectangle if the selection mode is QAbstractItemView::SingleSelection.
By default, this property is false
.
This property was introduced in Qt 4.3.
Access functions:
bool | isSelectionRectVisible() const |
void | setSelectionRectVisible(bool show) |
pub unsafe fn set_spacing(&self, space: c_int)
[src]
This property holds the space around the items in the layout
Calls C++ function: void QListView::setSpacing(int space)
.
This property holds the space around the items in the layout
This property is the size of the empty space that is padded around an item in the layout.
Setting this property when the view is visible will cause the items to be laid out again.
By default, this property contains a value of 0.
Access functions:
int | spacing() const |
void | setSpacing(int space) |
See also viewMode.
pub unsafe fn set_uniform_item_sizes(&self, enable: bool)
[src]
This property holds whether all items in the listview have the same size
Calls C++ function: void QListView::setUniformItemSizes(bool enable)
.
This property holds whether all items in the listview have the same size
This property should only be set to true if it is guaranteed that all items in the view have the same size. This enables the view to do some optimizations for performance purposes.
By default, this property is false
.
This property was introduced in Qt 4.1.
Access functions:
bool | uniformItemSizes() const |
void | setUniformItemSizes(bool enable) |
pub unsafe fn set_view_mode(&self, mode: ViewMode)
[src]
This property holds the view mode of the QListView.
Calls C++ function: void QListView::setViewMode(QListView::ViewMode mode)
.
This property holds the view mode of the QListView.
This property will change the other unset properties to conform with the set view mode. QListView-specific properties that have already been set will not be changed, unless clearPropertyFlags() has been called.
Setting the view mode will enable or disable drag and drop based on the selected movement. For ListMode, the default movement is Static (drag and drop disabled); for IconMode, the default movement is Free (drag and drop enabled).
Access functions:
ViewMode | viewMode() const |
void | setViewMode(ViewMode mode) |
See also isWrapping, spacing, gridSize, flow, movement, and resizeMode.
pub unsafe fn set_word_wrap(&self, on: bool)
[src]
This property holds the item text word-wrapping policy
Calls C++ function: void QListView::setWordWrap(bool on)
.
This property holds the item text word-wrapping policy
If this property is true
then the item text is wrapped where necessary at word-breaks; otherwise it is not wrapped at all. This property is false
by default.
Please note that even if wrapping is enabled, the cell will not be expanded to make room for the text. It will print ellipsis for text that cannot be shown, according to the view's textElideMode.
This property was introduced in Qt 4.2.
Access functions:
bool | wordWrap() const |
void | setWordWrap(bool on) |
pub unsafe fn set_wrapping(&self, enable: bool)
[src]
This property holds whether the items layout should wrap.
Calls C++ function: void QListView::setWrapping(bool enable)
.
This property holds whether the items layout should wrap.
This property holds whether the layout should wrap when there is no more space in the visible area. The point at which the layout wraps depends on the flow property.
Setting this property when the view is visible will cause the items to be laid out again.
By default, this property is false
.
Access functions:
bool | isWrapping() const |
void | setWrapping(bool enable) |
See also viewMode.
pub unsafe fn spacing(&self) -> c_int
[src]
This property holds the space around the items in the layout
Calls C++ function: int QListView::spacing() const
.
This property holds the space around the items in the layout
This property is the size of the empty space that is padded around an item in the layout.
Setting this property when the view is visible will cause the items to be laid out again.
By default, this property contains a value of 0.
Access functions:
int | spacing() const |
void | setSpacing(int space) |
See also viewMode.
pub unsafe fn uniform_item_sizes(&self) -> bool
[src]
This property holds whether all items in the listview have the same size
Calls C++ function: bool QListView::uniformItemSizes() const
.
This property holds whether all items in the listview have the same size
This property should only be set to true if it is guaranteed that all items in the view have the same size. This enables the view to do some optimizations for performance purposes.
By default, this property is false
.
This property was introduced in Qt 4.1.
Access functions:
bool | uniformItemSizes() const |
void | setUniformItemSizes(bool enable) |
pub unsafe fn view_mode(&self) -> ViewMode
[src]
This property holds the view mode of the QListView.
Calls C++ function: QListView::ViewMode QListView::viewMode() const
.
This property holds the view mode of the QListView.
This property will change the other unset properties to conform with the set view mode. QListView-specific properties that have already been set will not be changed, unless clearPropertyFlags() has been called.
Setting the view mode will enable or disable drag and drop based on the selected movement. For ListMode, the default movement is Static (drag and drop disabled); for IconMode, the default movement is Free (drag and drop enabled).
Access functions:
ViewMode | viewMode() const |
void | setViewMode(ViewMode mode) |
See also isWrapping, spacing, gridSize, flow, movement, and resizeMode.
pub unsafe fn visual_rect(
&self,
index: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QRect>
[src]
&self,
index: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QRect>
Reimplemented from QAbstractItemView::visualRect().
Calls C++ function: virtual QRect QListView::visualRect(const QModelIndex& index) const
.
Reimplemented from QAbstractItemView::visualRect().
pub unsafe fn word_wrap(&self) -> bool
[src]
This property holds the item text word-wrapping policy
Calls C++ function: bool QListView::wordWrap() const
.
This property holds the item text word-wrapping policy
If this property is true
then the item text is wrapped where necessary at word-breaks; otherwise it is not wrapped at all. This property is false
by default.
Please note that even if wrapping is enabled, the cell will not be expanded to make room for the text. It will print ellipsis for text that cannot be shown, according to the view's textElideMode.
This property was introduced in Qt 4.2.
Access functions:
bool | wordWrap() const |
void | setWordWrap(bool on) |
Trait Implementations
impl CppDeletable for QUndoView
[src]
unsafe fn delete(&self)
[src]
Destroys this view.
Calls C++ function: virtual [destructor] void QUndoView::~QUndoView()
.
Destroys this view.
impl Deref for QUndoView
[src]
type Target = QListView
The resulting type after dereferencing.
fn deref(&self) -> &QListView
[src]
Calls C++ function: QListView* static_cast<QListView*>(QUndoView* ptr)
.
impl DynamicCast<QUndoView> for QListView
[src]
unsafe fn dynamic_cast(ptr: Ptr<QListView>) -> Ptr<QUndoView>
[src]
Calls C++ function: QUndoView* dynamic_cast<QUndoView*>(QListView* ptr)
.
impl DynamicCast<QUndoView> for QAbstractItemView
[src]
unsafe fn dynamic_cast(ptr: Ptr<QAbstractItemView>) -> Ptr<QUndoView>
[src]
Calls C++ function: QUndoView* dynamic_cast<QUndoView*>(QAbstractItemView* ptr)
.
impl DynamicCast<QUndoView> for QAbstractScrollArea
[src]
unsafe fn dynamic_cast(ptr: Ptr<QAbstractScrollArea>) -> Ptr<QUndoView>
[src]
Calls C++ function: QUndoView* dynamic_cast<QUndoView*>(QAbstractScrollArea* ptr)
.
impl DynamicCast<QUndoView> for QFrame
[src]
unsafe fn dynamic_cast(ptr: Ptr<QFrame>) -> Ptr<QUndoView>
[src]
Calls C++ function: QUndoView* dynamic_cast<QUndoView*>(QFrame* ptr)
.
impl DynamicCast<QUndoView> for QWidget
[src]
unsafe fn dynamic_cast(ptr: Ptr<QWidget>) -> Ptr<QUndoView>
[src]
Calls C++ function: QUndoView* dynamic_cast<QUndoView*>(QWidget* ptr)
.
impl DynamicCast<QUndoView> for QObject
[src]
unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QUndoView>
[src]
Calls C++ function: QUndoView* dynamic_cast<QUndoView*>(QObject* ptr)
.
impl DynamicCast<QUndoView> for QPaintDevice
[src]
unsafe fn dynamic_cast(ptr: Ptr<QPaintDevice>) -> Ptr<QUndoView>
[src]
Calls C++ function: QUndoView* dynamic_cast<QUndoView*>(QPaintDevice* ptr)
.
impl StaticDowncast<QUndoView> for QListView
[src]
unsafe fn static_downcast(ptr: Ptr<QListView>) -> Ptr<QUndoView>
[src]
Calls C++ function: QUndoView* static_cast<QUndoView*>(QListView* ptr)
.
impl StaticDowncast<QUndoView> for QAbstractItemView
[src]
unsafe fn static_downcast(ptr: Ptr<QAbstractItemView>) -> Ptr<QUndoView>
[src]
Calls C++ function: QUndoView* static_cast<QUndoView*>(QAbstractItemView* ptr)
.
impl StaticDowncast<QUndoView> for QAbstractScrollArea
[src]
unsafe fn static_downcast(ptr: Ptr<QAbstractScrollArea>) -> Ptr<QUndoView>
[src]
Calls C++ function: QUndoView* static_cast<QUndoView*>(QAbstractScrollArea* ptr)
.
impl StaticDowncast<QUndoView> for QFrame
[src]
unsafe fn static_downcast(ptr: Ptr<QFrame>) -> Ptr<QUndoView>
[src]
Calls C++ function: QUndoView* static_cast<QUndoView*>(QFrame* ptr)
.
impl StaticDowncast<QUndoView> for QWidget
[src]
unsafe fn static_downcast(ptr: Ptr<QWidget>) -> Ptr<QUndoView>
[src]
Calls C++ function: QUndoView* static_cast<QUndoView*>(QWidget* ptr)
.
impl StaticDowncast<QUndoView> for QObject
[src]
unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QUndoView>
[src]
Calls C++ function: QUndoView* static_cast<QUndoView*>(QObject* ptr)
.
impl StaticDowncast<QUndoView> for QPaintDevice
[src]
unsafe fn static_downcast(ptr: Ptr<QPaintDevice>) -> Ptr<QUndoView>
[src]
Calls C++ function: QUndoView* static_cast<QUndoView*>(QPaintDevice* ptr)
.
impl StaticUpcast<QAbstractItemView> for QUndoView
[src]
unsafe fn static_upcast(ptr: Ptr<QUndoView>) -> Ptr<QAbstractItemView>
[src]
Calls C++ function: QAbstractItemView* static_cast<QAbstractItemView*>(QUndoView* ptr)
.
impl StaticUpcast<QAbstractScrollArea> for QUndoView
[src]
unsafe fn static_upcast(ptr: Ptr<QUndoView>) -> Ptr<QAbstractScrollArea>
[src]
Calls C++ function: QAbstractScrollArea* static_cast<QAbstractScrollArea*>(QUndoView* ptr)
.
impl StaticUpcast<QFrame> for QUndoView
[src]
unsafe fn static_upcast(ptr: Ptr<QUndoView>) -> Ptr<QFrame>
[src]
Calls C++ function: QFrame* static_cast<QFrame*>(QUndoView* ptr)
.
impl StaticUpcast<QListView> for QUndoView
[src]
unsafe fn static_upcast(ptr: Ptr<QUndoView>) -> Ptr<QListView>
[src]
Calls C++ function: QListView* static_cast<QListView*>(QUndoView* ptr)
.
impl StaticUpcast<QObject> for QUndoView
[src]
unsafe fn static_upcast(ptr: Ptr<QUndoView>) -> Ptr<QObject>
[src]
Calls C++ function: QObject* static_cast<QObject*>(QUndoView* ptr)
.
impl StaticUpcast<QPaintDevice> for QUndoView
[src]
unsafe fn static_upcast(ptr: Ptr<QUndoView>) -> Ptr<QPaintDevice>
[src]
Calls C++ function: QPaintDevice* static_cast<QPaintDevice*>(QUndoView* ptr)
.
impl StaticUpcast<QWidget> for QUndoView
[src]
Auto Trait Implementations
impl RefUnwindSafe for QUndoView
impl Send for QUndoView
impl Sync for QUndoView
impl Unpin for QUndoView
impl UnwindSafe for QUndoView
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,