picker_base¶
Module Contents¶
Separator widget |
|
Item mask widget |
|
Picker column formatter |
|
Digit formatter |
|
Picker column button |
|
Picker base class |
|
Picker tool button |
|
picker panel |
|
check whether the index is out of range |
- class SeparatorWidget(orient: PyQt5.QtCore.Qt.Orientation, parent=None)¶
Bases:
PyQt5.QtWidgets.QWidgetSeparator widget
- class ItemMaskWidget(listWidgets: List[qfluentwidgets.components.widgets.cycle_list_widget.CycleListWidget], parent=None)¶
Bases:
PyQt5.QtWidgets.QWidgetItem mask widget
- listWidgets¶
- lightBackgroundColor¶
- darkBackgroundColor¶
- setCustomBackgroundColor(light, dark)¶
- paintEvent(e)¶
- class PickerColumnFormatter¶
Bases:
PyQt5.QtCore.QObjectPicker column formatter
- encode(value)¶
convert original value to formatted value
- decode(value: str)¶
convert formatted value to original value
- class DigitFormatter¶
Bases:
PickerColumnFormatterDigit formatter
- decode(value)¶
convert formatted value to original value
- class PickerColumnButton(name: str, items: Iterable, width: int, align=Qt.AlignLeft, formatter=None, parent=None)¶
Bases:
PyQt5.QtWidgets.QPushButtonPicker column button
- align()¶
- setAlignment(align=Qt.AlignCenter)¶
set the text alignment
- value() str¶
- setValue(v)¶
- items()¶
- setItems(items: Iterable)¶
- formatter()¶
- setFormatter(formatter)¶
- name()¶
- setName(name: str)¶
- checkColumnIndex(func)¶
check whether the index is out of range
- class PickerBase(parent=None)¶
Bases:
PyQt5.QtWidgets.QPushButtonPicker base class
- columns: List[PickerColumnButton] = []¶
- lightSelectedBackgroundColor¶
- darkSelectedBackgroundColor¶
- hBoxLayout¶
- setSelectedBackgroundColor(light, dark)¶
set the background color of selected row
- 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
- setColumnAlignment(index: int, align=Qt.AlignCenter)¶
set the text alignment of specified column
- setColumnWidth(index: int, width: int)¶
set the width of specified column
- setColumnTight(index: int)¶
make the specified column to be tight
- setColumnVisible(index: int, isVisible: bool)¶
set the text alignment of specified column
- value()¶
- initialValue()¶
- setColumnValue(index: int, value)¶
- setColumnInitialValue(index: int, value)¶
- setColumnFormatter(index: int, formatter: PickerColumnFormatter)¶
- setColumnItems(index: int, items: Iterable)¶
- encodeValue(index: int, value)¶
convert original value to formatted value
- decodeValue(index: int, value)¶
convert formatted value to origin value
- 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
- clearColumns()¶
clear columns
- enterEvent(e)¶
- leaveEvent(e)¶
- mousePressEvent(e)¶
- mouseReleaseEvent(e)¶
- panelInitialValue()¶
initial value of panel
- setScrollButtonRepeatEnabled(isEnabled: bool)¶
set whether to enable scroll button auto repeat
- reset()¶
- isRestEnabled()¶
- setResetEnabled(isEnabled: bool)¶
set the visibility of reset button
- class PickerToolButton(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
qfluentwidgets.components.widgets.button.TransparentToolButtonPicker tool button
- class PickerPanel(parent=None)¶
Bases:
PyQt5.QtWidgets.QWidgetpicker panel
- confirmed¶
- resetted¶
- columnValueChanged¶
- itemHeight = 37¶
- listWidgets: List[qfluentwidgets.components.widgets.cycle_list_widget.CycleListWidget] = []¶
- view¶
- itemMaskWidget¶
- hSeparatorWidget¶
- yesButton¶
- resetButton¶
- cancelButton¶
- hBoxLayout¶
- listLayout¶
- buttonLayout¶
- vBoxLayout¶
- scrollButtonRepeatEnabled = True¶
- setShadowEffect(blurRadius=30, offset=(0, 8), color=QColor(0, 0, 0, 30))¶
add shadow to dialog
- setResetEnabled(isEnabled: bool)¶
set the visibility of reset button
- setScrollButtonRepeatEnabled(isEnabled: bool)¶
set whether to enable scroll button auto repeat
- setSelectedBackgroundColor(light, dark)¶
- isResetEnabled()¶
- 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
- resizeEvent(e)¶
- value()¶
return the value of columns
- setValue(value: list)¶
set the value of columns
- columnValue(index: int) str¶
return the value of specified column
- setColumnValue(index: int, value: str)¶
set the value of specified column
- column(index: int)¶
return the list widget of specified column