date_time¶
Package Contents¶
Calendar picker |
|
Pro calendar picker |
|
Date picker base class |
|
Date picker |
|
Chinese date picker |
|
Picker base class |
|
picker panel |
|
Picker column formatter |
|
24 hours time picker |
|
AM/PM time picker |
- class CalendarPicker(parent=None)¶
Bases:
PyQt5.QtWidgets.QPushButtonCalendar picker
- dateChanged¶
- getDate()¶
- setDate(date: PyQt5.QtCore.QDate)¶
set the selected date
- reset()¶
reset date
- getDateFormat()¶
- setDateFormat(format: PyQt5.QtCore.Qt.DateFormat | str)¶
- isRestEnabled()¶
- setResetEnabled(isEnabled: bool)¶
set the visibility of reset button
- paintEvent(e)¶
- date¶
- dateFormat¶
- class FastCalendarPicker(parent=None)¶
Bases:
CalendarPickerPro calendar picker
- flyoutAnimationType¶
- setFlyoutAnimationType(aniType: qfluentwidgets.components.widgets.flyout.FlyoutAnimationType)¶
- class DatePickerBase(parent=None)¶
Bases:
qfluentwidgets.components.date_time.picker_base.PickerBaseDate picker base class
- dateChanged¶
- calendar¶
- getDate()¶
- abstract setDate(date: PyQt5.QtCore.QDate)¶
set current date
- setYearFormatter(formatter: qfluentwidgets.components.date_time.picker_base.PickerColumnFormatter)¶
- setMonthFormatter(formatter: qfluentwidgets.components.date_time.picker_base.PickerColumnFormatter)¶
- setDayFormatter(formatter: qfluentwidgets.components.date_time.picker_base.PickerColumnFormatter)¶
- yearFormatter()¶
- dayFormatter()¶
- monthFormatter()¶
- reset()¶
Reset date
- class DatePicker(parent=None, format=MM_DD_YYYY, isMonthTight=True)¶
Bases:
DatePickerBaseDate picker
- MM_DD_YYYY = 0¶
- YYYY_MM_DD = 1¶
- MONTH¶
- YEAR¶
- DAY¶
- isMonthTight = True¶
- setDateFormat(format: int)¶
set the format of date
Parameters¶
- format: int
the format of date, could be DatePicker.MM_DD_YYYY or DatePicker.YYYY_MM_DD
- panelInitialValue()¶
initial value of panel
- setMonthTight(isTight: bool)¶
set whether the month column is tight
- getDate()¶
- setDate(date: PyQt5.QtCore.QDate)¶
set current date
- date¶
- class ZhDatePicker(parent=None)¶
Bases:
DatePickerChinese date picker
- MONTH = '月'¶
- YEAR = '年'¶
- DAY = '日'¶
- 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 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
- 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 TimePicker(parent=None, showSeconds=False)¶
Bases:
TimePickerBase24 hours time picker
- setSecondVisible(isVisible: bool)¶
set the visibility of seconds column
- panelInitialValue()¶
initial value of panel
- getTime()¶
- isSecondVisible()¶
- time¶
- secondVisible¶