date_time#
Package Contents#
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.QPushButton
Calendar picker
- dateChanged#
- date#
- dateFormat#
- getDate()#
- setDate(date: PyQt5.QtCore.QDate)#
set the selected date
- getDateFormat()#
- setDateFormat(format: PyQt5.QtCore.Qt.DateFormat | str)#
- paintEvent(e)#
- class DatePickerBase(parent=None)#
Bases:
qfluentwidgets.components.date_time.picker_base.PickerBase
Date picker base class
- dateChanged#
- 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()#
- class DatePicker(parent=None, format=MM_DD_YYYY, isMonthTight=True)#
Bases:
DatePickerBase
Date picker
- MM_DD_YYYY = 0#
- YYYY_MM_DD = 1#
- date#
- 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
- class ZhDatePicker(parent=None)#
Bases:
DatePicker
Chinese date picker
- class PickerBase(parent=None)#
Bases:
PyQt5.QtWidgets.QPushButton
Picker base class
- 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
- class PickerPanel(parent=None)#
Bases:
PyQt5.QtWidgets.QWidget
picker panel
- confirmed#
- columnValueChanged#
- setShadowEffect(blurRadius=30, offset=(0, 8), color=QColor(0, 0, 0, 30))#
add shadow to dialog
- 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.QObject
Picker 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:
TimePickerBase
24 hours time picker
- time#
- secondVisible#
- setSecondVisible(isVisible: bool)#
set the visibility of seconds column
- panelInitialValue()#
initial value of panel
- getTime()#
- isSecondVisible()#