pub struct EditTriggers(/* private fields */);Expand description
Which gestures open a cell editor — a set, composed with |, after
Qt’s QAbstractItemView::EditTriggers.
A set rather than an enum of named combinations, because the combinations
are the caller’s to choose: “one click” and “F2 or one click” are ordinary
requests that a closed enum of F2 / F2OrType / F2OrTypeOrDoubleClick / DoubleClick / None could not express at all.
Set table-wide with TableView::edit_triggers
/ TreeTableView::edit_triggers, and
per column with Column::edit_triggers — the column wins where it sets
one. Only cells of an editable column ever open an
editor, whatever the triggers say; the two are the same split Qt makes
between a view’s editTriggers and an item’s ItemIsEditable.
SINGLE_CLICK claims the press. A cell that edits on one click does not
also select its row — the same trade any interactive cell content already
makes, and the reason it is per column: put it on the columns that are
nothing but a value, and leave the row’s own column alone.
Implementations§
Source§impl EditTriggers
impl EditTriggers
Sourcepub const NONE: Self
pub const NONE: Self
Editing is never opened by the view. Cells of an editable column still
render normally; nothing reaches on_cell_edit_request.
Sourcepub const ANY_KEY: Self
pub const ANY_KEY: Self
Any printable character typed on the focused cell. Note that the keystroke that opens the editor is not delivered into it — the editor does not exist until the next build — so this reads as “F2 with an extra key”, and it shadows type-ahead on every editable column.
Sourcepub const SINGLE_CLICK: Self
pub const SINGLE_CLICK: Self
A single click on the cell. Claims the press, so that cell no longer selects its row.
Sourcepub const DOUBLE_CLICK: Self
pub const DOUBLE_CLICK: Self
A double click on the cell. It takes the gesture from row activation on this column — a column that edits on double-click must not also open its row on the same click — while every other column still activates.
pub const fn union(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
Trait Implementations§
Source§impl BitAnd for EditTriggers
impl BitAnd for EditTriggers
Source§impl BitOr for EditTriggers
impl BitOr for EditTriggers
Source§impl BitOrAssign for EditTriggers
impl BitOrAssign for EditTriggers
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|= operation. Read moreSource§impl Clone for EditTriggers
impl Clone for EditTriggers
Source§fn clone(&self) -> EditTriggers
fn clone(&self) -> EditTriggers
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EditTriggers
Source§impl Debug for EditTriggers
impl Debug for EditTriggers
Source§impl Default for EditTriggers
impl Default for EditTriggers
impl Eq for EditTriggers
Source§impl PartialEq for EditTriggers
impl PartialEq for EditTriggers
Source§fn eq(&self, other: &EditTriggers) -> bool
fn eq(&self, other: &EditTriggers) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EditTriggers
Auto Trait Implementations§
impl Freeze for EditTriggers
impl RefUnwindSafe for EditTriggers
impl Send for EditTriggers
impl Sync for EditTriggers
impl Unpin for EditTriggers
impl UnsafeUnpin for EditTriggers
impl UnwindSafe for EditTriggers
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more