settings ======== .. py:module:: qfluentwidgets.components.settings .. toctree:: :titlesonly: :maxdepth: 1 custom_color_setting_card/index.rst expand_setting_card/index.rst folder_list_setting_card/index.rst options_setting_card/index.rst setting_card/index.rst setting_card_group/index.rst Package Contents ---------------- .. autoapisummary:: qfluentwidgets.components.settings.SettingCard qfluentwidgets.components.settings.SwitchSettingCard qfluentwidgets.components.settings.RangeSettingCard qfluentwidgets.components.settings.PushSettingCard qfluentwidgets.components.settings.ColorSettingCard qfluentwidgets.components.settings.HyperlinkCard qfluentwidgets.components.settings.PrimaryPushSettingCard qfluentwidgets.components.settings.ColorPickerButton qfluentwidgets.components.settings.ComboBoxSettingCard qfluentwidgets.components.settings.ExpandSettingCard qfluentwidgets.components.settings.ExpandGroupSettingCard qfluentwidgets.components.settings.FolderListSettingCard qfluentwidgets.components.settings.OptionsSettingCard qfluentwidgets.components.settings.CustomColorSettingCard qfluentwidgets.components.settings.SettingCardGroup .. py:class:: SettingCard(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], title, content=None, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QFrame` Setting card .. py:attribute:: iconLabel .. py:attribute:: titleLabel .. py:attribute:: contentLabel .. py:attribute:: hBoxLayout .. py:attribute:: vBoxLayout .. py:method:: setTitle(title: str) set the title of card .. py:method:: setContent(content: str) set the content of card .. py:method:: setValue(value) set the value of config item .. py:method:: setIconSize(width: int, height: int) set the icon fixed size .. py:method:: paintEvent(e) .. py:class:: SwitchSettingCard(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], title, content=None, configItem: qfluentwidgets.common.config.ConfigItem = None, parent=None) Bases: :py:obj:`SettingCard` Setting card with switch button .. py:attribute:: checkedChanged .. py:attribute:: configItem .. py:attribute:: switchButton .. py:method:: setValue(isChecked: bool) set the value of config item .. py:method:: setChecked(isChecked: bool) .. py:method:: isChecked() .. py:class:: RangeSettingCard(configItem, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], title, content=None, parent=None) Bases: :py:obj:`SettingCard` Setting card with a slider .. py:attribute:: valueChanged .. py:attribute:: configItem .. py:attribute:: slider .. py:attribute:: valueLabel .. py:method:: setValue(value) set the value of config item .. py:class:: PushSettingCard(text, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], title, content=None, parent=None) Bases: :py:obj:`SettingCard` Setting card with a push button .. py:attribute:: clicked .. py:attribute:: button .. py:class:: ColorSettingCard(configItem, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], title: str, content: str = None, parent=None, enableAlpha=False) Bases: :py:obj:`SettingCard` Setting card with color picker .. py:attribute:: colorChanged .. py:attribute:: configItem .. py:attribute:: colorPicker .. py:method:: setValue(color: PyQt5.QtGui.QColor) set the value of config item .. py:class:: HyperlinkCard(url, text, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], title, content=None, parent=None) Bases: :py:obj:`SettingCard` Hyperlink card .. py:attribute:: linkButton .. py:class:: PrimaryPushSettingCard(text, icon, title, content=None, parent=None) Bases: :py:obj:`PushSettingCard` Push setting card with primary color .. py:class:: ColorPickerButton(color: PyQt5.QtGui.QColor, title: str, parent=None, enableAlpha=False) Bases: :py:obj:`PyQt5.QtWidgets.QToolButton` Color picker button .. py:attribute:: colorChanged .. py:attribute:: title .. py:attribute:: enableAlpha .. py:method:: setColor(color) set color .. py:method:: paintEvent(e) .. py:class:: ComboBoxSettingCard(configItem: qfluentwidgets.common.config.OptionsConfigItem, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], title, content=None, texts=None, parent=None) Bases: :py:obj:`SettingCard` Setting card with a combo box .. py:attribute:: configItem .. py:attribute:: comboBox .. py:attribute:: optionToText .. py:method:: setValue(value) set the value of config item .. py:class:: ExpandSettingCard(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIcon], title: str, content: str = None, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QScrollArea` Expandable setting card .. py:attribute:: isExpand :value: False .. py:attribute:: scrollWidget .. py:attribute:: view .. py:attribute:: card .. py:attribute:: scrollLayout .. py:attribute:: viewLayout .. py:attribute:: spaceWidget .. py:attribute:: borderWidget .. py:attribute:: expandAni .. py:method:: addWidget(widget: PyQt5.QtWidgets.QWidget) add widget to tail .. py:method:: wheelEvent(e) .. py:method:: setExpand(isExpand: bool) set the expand status of card .. py:method:: toggleExpand() toggle expand status .. py:method:: resizeEvent(e) .. py:method:: setValue(value) set the value of config item .. py:class:: ExpandGroupSettingCard(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIcon], title: str, content: str = None, parent=None) Bases: :py:obj:`ExpandSettingCard` Expand group setting card .. py:method:: addGroupWidget(widget: PyQt5.QtWidgets.QWidget) add widget to group .. py:class:: FolderListSettingCard(configItem: qfluentwidgets.common.config.ConfigItem, title: str, content: str = None, directory='./', parent=None) Bases: :py:obj:`qfluentwidgets.components.settings.expand_setting_card.ExpandSettingCard` Folder list setting card .. py:attribute:: folderChanged .. py:attribute:: configItem .. py:attribute:: addFolderButton .. py:attribute:: folders :type: List[str] .. py:class:: OptionsSettingCard(configItem, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], title, content=None, texts=None, parent=None) Bases: :py:obj:`qfluentwidgets.components.settings.expand_setting_card.ExpandSettingCard` setting card with a group of options .. py:attribute:: optionChanged .. py:attribute:: texts .. py:attribute:: configItem .. py:attribute:: configName .. py:attribute:: choiceLabel .. py:attribute:: buttonGroup .. py:method:: setValue(value) select button according to the value .. py:class:: CustomColorSettingCard(configItem: qfluentwidgets.common.config.ColorConfigItem, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], title: str, content=None, parent=None, enableAlpha=False) Bases: :py:obj:`qfluentwidgets.components.settings.expand_setting_card.ExpandGroupSettingCard` Custom color setting card .. py:attribute:: colorChanged .. py:attribute:: enableAlpha .. py:attribute:: configItem .. py:attribute:: defaultColor .. py:attribute:: customColor .. py:attribute:: choiceLabel .. py:attribute:: radioWidget .. py:attribute:: radioLayout .. py:attribute:: defaultRadioButton .. py:attribute:: customRadioButton .. py:attribute:: buttonGroup .. py:attribute:: customColorWidget .. py:attribute:: customColorLayout .. py:attribute:: customLabel .. py:attribute:: chooseColorButton .. py:class:: SettingCardGroup(title: str, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Setting card group .. py:attribute:: titleLabel .. py:attribute:: vBoxLayout .. py:attribute:: cardLayout .. py:method:: addSettingCard(card: PyQt5.QtWidgets.QWidget) add setting card to group .. py:method:: addSettingCards(cards: List[PyQt5.QtWidgets.QWidget]) add setting cards to group .. py:method:: adjustSize()