spin_box ======== .. py:module:: qfluentwidgets.components.widgets.spin_box Module Contents --------------- .. autoapisummary:: qfluentwidgets.components.widgets.spin_box.SpinIcon qfluentwidgets.components.widgets.spin_box.SpinButton qfluentwidgets.components.widgets.spin_box.CompactSpinButton qfluentwidgets.components.widgets.spin_box.SpinFlyoutView qfluentwidgets.components.widgets.spin_box.SpinBoxBase qfluentwidgets.components.widgets.spin_box.InlineSpinBoxBase qfluentwidgets.components.widgets.spin_box.CompactSpinBoxBase qfluentwidgets.components.widgets.spin_box.SpinBox qfluentwidgets.components.widgets.spin_box.CompactSpinBox qfluentwidgets.components.widgets.spin_box.DoubleSpinBox qfluentwidgets.components.widgets.spin_box.CompactDoubleSpinBox qfluentwidgets.components.widgets.spin_box.TimeEdit qfluentwidgets.components.widgets.spin_box.CompactTimeEdit qfluentwidgets.components.widgets.spin_box.DateTimeEdit qfluentwidgets.components.widgets.spin_box.CompactDateTimeEdit qfluentwidgets.components.widgets.spin_box.DateEdit qfluentwidgets.components.widgets.spin_box.CompactDateEdit .. py:class:: SpinIcon Bases: :py:obj:`qfluentwidgets.common.icon.FluentIconBase`, :py:obj:`enum.Enum` Spin icon .. py:attribute:: UP :value: 'Up' .. py:attribute:: DOWN :value: 'Down' .. py:method:: path(theme=Theme.AUTO) get the path of icon Parameters ---------- theme: Theme the theme of icon * `Theme.Light`: black icon * `Theme.DARK`: white icon * `Theme.AUTO`: icon color depends on `config.theme` .. py:class:: SpinButton(icon: SpinIcon, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QToolButton` .. py:attribute:: isPressed :value: False .. py:method:: mousePressEvent(e) .. py:method:: mouseReleaseEvent(e) .. py:method:: paintEvent(e) .. py:class:: CompactSpinButton(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QToolButton` Compact spin button .. py:method:: paintEvent(e) .. py:class:: SpinFlyoutView(parent=None) Bases: :py:obj:`qfluentwidgets.components.widgets.flyout.FlyoutViewBase` Spin flyout view .. py:attribute:: upButton .. py:attribute:: downButton .. py:attribute:: vBoxLayout .. py:method:: paintEvent(e) .. py:class:: SpinBoxBase(parent=None) Spin box ui .. py:attribute:: lightFocusedBorderColor .. py:attribute:: darkFocusedBorderColor .. py:attribute:: hBoxLayout .. py:method:: isError() .. py:method:: setError(isError: bool) set the error status .. py:method:: setReadOnly(isReadOnly: bool) .. py:method:: setSymbolVisible(isVisible: bool) set whether the spin symbol is visible .. py:method:: setCustomFocusedBorderColor(light, dark) set the border color in focused status Parameters ---------- light, dark: str | QColor | Qt.GlobalColor border color in light/dark theme mode .. py:method:: focusedBorderColor() .. py:method:: paintEvent(e) .. py:class:: InlineSpinBoxBase(parent=None) Bases: :py:obj:`SpinBoxBase` Inline spin box base .. py:attribute:: upButton .. py:attribute:: downButton .. py:method:: setSymbolVisible(isVisible: bool) set whether the spin symbol is visible .. py:method:: setAccelerated(on: bool) .. py:class:: CompactSpinBoxBase(parent=None) Bases: :py:obj:`SpinBoxBase` Compact spin box base .. py:attribute:: compactSpinButton .. py:attribute:: spinFlyoutView .. py:attribute:: spinFlyout .. py:method:: focusInEvent(e) .. py:method:: setAccelerated(on: bool) .. py:method:: setSymbolVisible(isVisible: bool) set whether the spin symbol is visible .. py:class:: SpinBox(parent=None) Bases: :py:obj:`InlineSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QSpinBox` Spin box .. py:class:: CompactSpinBox(parent=None) Bases: :py:obj:`CompactSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QSpinBox` Compact spin box .. py:class:: DoubleSpinBox(parent=None) Bases: :py:obj:`InlineSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QDoubleSpinBox` Double spin box .. py:class:: CompactDoubleSpinBox(parent=None) Bases: :py:obj:`CompactSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QDoubleSpinBox` Compact double spin box .. py:class:: TimeEdit(parent=None) Bases: :py:obj:`InlineSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QTimeEdit` Time edit .. py:class:: CompactTimeEdit(parent=None) Bases: :py:obj:`CompactSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QTimeEdit` Compact time edit .. py:class:: DateTimeEdit(parent=None) Bases: :py:obj:`InlineSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QDateTimeEdit` Date time edit .. py:class:: CompactDateTimeEdit(parent=None) Bases: :py:obj:`CompactSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QDateTimeEdit` Compact date time edit .. py:class:: DateEdit(parent=None) Bases: :py:obj:`InlineSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QDateEdit` Date edit .. py:class:: CompactDateEdit(parent=None) Bases: :py:obj:`CompactSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QDateEdit` Compact date edit