The selector module¶
SelectorViewMixin class, to mixin with View.
Adds the capability to select or unselect Pages.
- class SelectorViewMixin(parent=None, **kwds)[source]¶
Bases:
object
SelectorViewMixin class, to mixin with View.
Adds the capability to select or unselect Pages. Pages are numbered from 1.
Instance variables:
userChangeSelectionModeEnabled
= Truewhether the user can change the selectionMode (by longpressing a page to enable selectionMode, and pressing ESC to leave selectionMode. (Be sure to mix in the
qpageview.util.LongMousePressMixin
class when you want to use the long mouse press event.)
- selectionChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- selectionModeChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- userChangeSelectionModeEnabled = True¶
- modifySelection()[source]¶
Context manager that allows changing the selection.
Yields a set, and on exit of the context, stores the modifications and emits the selectionChanged() signal. Used internally by all other methods.