picker_base =========== .. py:module:: qfluentwidgets.components.date_time.picker_base Module Contents --------------- .. autoapisummary:: qfluentwidgets.components.date_time.picker_base.SeparatorWidget qfluentwidgets.components.date_time.picker_base.ItemMaskWidget qfluentwidgets.components.date_time.picker_base.PickerColumnFormatter qfluentwidgets.components.date_time.picker_base.DigitFormatter qfluentwidgets.components.date_time.picker_base.PickerColumnButton qfluentwidgets.components.date_time.picker_base.PickerBase qfluentwidgets.components.date_time.picker_base.PickerToolButton qfluentwidgets.components.date_time.picker_base.PickerPanel .. autoapisummary:: qfluentwidgets.components.date_time.picker_base.checkColumnIndex .. py:class:: SeparatorWidget(orient: PyQt5.QtCore.Qt.Orientation, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Separator widget .. py:class:: ItemMaskWidget(listWidgets: List[qfluentwidgets.components.widgets.cycle_list_widget.CycleListWidget], parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Item mask widget .. py:attribute:: listWidgets .. py:method:: paintEvent(e) .. py:class:: PickerColumnFormatter Bases: :py:obj:`PyQt5.QtCore.QObject` Picker column formatter .. py:method:: encode(value) convert original value to formatted value .. py:method:: decode(value: str) convert formatted value to original value .. py:class:: DigitFormatter Bases: :py:obj:`PickerColumnFormatter` Digit formatter .. py:method:: decode(value) convert formatted value to original value .. py:class:: PickerColumnButton(name: str, items: Iterable, width: int, align=Qt.AlignLeft, formatter=None, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QPushButton` Picker column button .. py:method:: align() .. py:method:: setAlignment(align=Qt.AlignCenter) set the text alignment .. py:method:: value() -> str .. py:method:: setValue(v) .. py:method:: items() .. py:method:: setItems(items: Iterable) .. py:method:: formatter() .. py:method:: setFormatter(formatter) .. py:method:: name() .. py:method:: setName(name: str) .. py:function:: checkColumnIndex(func) check whether the index is out of range .. py:class:: PickerBase(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QPushButton` Picker base class .. py:attribute:: columns :type: List[PickerColumnButton] :value: [] .. py:attribute:: hBoxLayout .. py:method:: addColumn(name: str, items: Iterable, width: int, align=Qt.AlignCenter, formatter: PickerColumnFormatter = None) add column Parameters ---------- name: str the name of column items: Iterable the items of column width: int the width of column align: Qt.AlignmentFlag the text alignment of button formatter: PickerColumnFormatter the formatter of column .. py:method:: setColumnAlignment(index: int, align=Qt.AlignCenter) set the text alignment of specified column .. py:method:: setColumnWidth(index: int, width: int) set the width of specified column .. py:method:: setColumnTight(index: int) make the specified column to be tight .. py:method:: setColumnVisible(index: int, isVisible: bool) set the text alignment of specified column .. py:method:: value() .. py:method:: initialValue() .. py:method:: setColumnValue(index: int, value) .. py:method:: setColumnInitialValue(index: int, value) .. py:method:: setColumnFormatter(index: int, formatter: PickerColumnFormatter) .. py:method:: setColumnItems(index: int, items: Iterable) .. py:method:: encodeValue(index: int, value) convert original value to formatted value .. py:method:: decodeValue(index: int, value) convert formatted value to origin value .. py:method:: setColumn(index: int, name: str, items: Iterable, width: int, align=Qt.AlignCenter) set column Parameters ---------- index: int the index of column name: str the name of column items: Iterable the items of column width: int the width of column align: Qt.AlignmentFlag the text alignment of button .. py:method:: clearColumns() clear columns .. py:method:: enterEvent(e) .. py:method:: leaveEvent(e) .. py:method:: mousePressEvent(e) .. py:method:: mouseReleaseEvent(e) .. py:method:: panelInitialValue() initial value of panel .. py:class:: PickerToolButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`qfluentwidgets.components.widgets.button.TransparentToolButton` Picker tool button .. py:class:: PickerPanel(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` picker panel .. py:attribute:: confirmed .. py:attribute:: columnValueChanged .. py:attribute:: itemHeight :value: 37 .. py:attribute:: listWidgets :type: List[qfluentwidgets.components.widgets.cycle_list_widget.CycleListWidget] :value: [] .. py:attribute:: view .. py:attribute:: itemMaskWidget .. py:attribute:: hSeparatorWidget .. py:attribute:: yesButton .. py:attribute:: cancelButton .. py:attribute:: hBoxLayout .. py:attribute:: listLayout .. py:attribute:: buttonLayout .. py:attribute:: vBoxLayout .. py:method:: setShadowEffect(blurRadius=30, offset=(0, 8), color=QColor(0, 0, 0, 30)) add shadow to dialog .. py:method:: addColumn(items: Iterable, width: int, align=Qt.AlignCenter) add one column to view Parameters ---------- items: Iterable[Any] the items to be added width: int the width of item align: Qt.AlignmentFlag the text alignment of item .. py:method:: resizeEvent(e) .. py:method:: value() return the value of columns .. py:method:: setValue(value: list) set the value of columns .. py:method:: columnValue(index: int) -> str return the value of specified column .. py:method:: setColumnValue(index: int, value: str) set the value of specified column .. py:method:: column(index: int) return the list widget of specified column .. py:method:: exec(pos, ani=True) show panel Parameters ---------- pos: QPoint pop-up position ani: bool Whether to show pop-up animation