PushbuttonModule(3)
💖 PushbuttonModule(3) 💖
okay so this is PushbuttonModule, straight out of the Library Functions Manual for LIBKYSDK-APPLICATIONS — and bestie, it's a whole family of cute little buttons. Sit down, grab a snack 🍓, we're going through everything.
✨ NAME ✨
PushbuttonModule — yes. That's it. That's the name. The module is literally called PushbuttonModule. She said "I am the moment." 💅
🦋 SYNOPSIS 🦋
👑 Classes
class kdk::KBorderButton— 带边框的按钮 — a button with a border. Groundbreaking? No. Essential? Yes.class kdk::KBorderlessButton— 无边框按钮 — the no-border one. Minimalist queen.class kdk::KMenuButton— 下拉菜单按钮 — a dropdown menu button. It opens, it drops, it serves.class kdk::KSwitchButton— 指示打开/关闭两种状态 — shows the on / off situation. two states, no confusion.class kdk::KToolButton— 提供了一个快速访问按钮,暂不支持显示文本 — gives you a quick-access button, and heads up: text display is not supported yet. it's giving icon-only main character energy.
🌈 Enumerations
enum kdk::KToolButtonType { Flat, SemiFlat, Background, Frameless }— 支持三种样式,暂不支持文字显示 — three styles supported, and again: no text display for now. (yes, that's four values listed. we don't ask questions, we just copy the facts ✨)
💫 Functions
kdk::KBorderButton::KBorderButton (QWidget *parent=nullptr)kdk::KBorderButton::KBorderButton (const QString &text, QWidget *parent=nullptr)kdk::KBorderButton::KBorderButton (const QIcon &icon, const QString &text, QWidget *parent=nullptr)kdk::KBorderButton::KBorderButton (const QIcon &icon, QWidget *parent=nullptr)void kdk::KBorderButton::setIcon (const QIcon &icon)— 设置按钮图标 — sets the button iconbool kdk::KBorderButton::eventFilter (QObject *watched, QEvent *event)void kdk::KBorderButton::paintEvent (QPaintEvent *event)QSize kdk::KBorderButton::sizeHint () const overridekdk::KBorderlessButton::KBorderlessButton (QWidget *parent=nullptr)kdk::KBorderlessButton::KBorderlessButton (const QString &text, QWidget *parent=nullptr)kdk::KBorderlessButton::KBorderlessButton (const QIcon &icon, const QString &text, QWidget *parent=nullptr)kdk::KBorderlessButton::KBorderlessButton (const QIcon &icon, QWidget *parent=nullptr)void kdk::KBorderlessButton::setIcon (const QIcon &icon)— 设置按钮图标 — sets the button iconbool kdk::KBorderlessButton::eventFilter (QObject *watched, QEvent *event)void kdk::KBorderlessButton::paintEvent (QPaintEvent *event)QSize kdk::KBorderlessButton::sizeHint () constkdk::KMenuButton::KMenuButton (QWidget *parent=nullptr)QMenu * kdk::KMenuButton::menu ()— 获取主菜单 — grab the main menuQMenu * kdk::KMenuButton::themeMenu ()— 获取主题菜单 — grab the theme menuQAction * kdk::KMenuButton::settingAction ()— 获取设置action — grab the settings actionQAction * kdk::KMenuButton::themeAction ()— 获取主题Action — grab the theme actionQAction * kdk::KMenuButton::assistAction ()— 获取帮助Action — grab the help actionQAction * kdk::KMenuButton::aboutAction ()— 获取关于Action — grab the about actionQAction * kdk::KMenuButton::feedbackAction ()— 获取意见反馈Action — grab the feedback actionQAction * kdk::KMenuButton::quitAction ()— 获取离开Action — grab the quit actionQAction * kdk::KMenuButton::autoAction ()— 获取跟随主题Action — grab the follow-the-theme actionQAction * kdk::KMenuButton::lightAction ()— 获取浅色主题Action — grab the light theme actionQAction * kdk::KMenuButton::darkAction ()— 获取深色Action — grab the dark actionvoid kdk::KMenuButton::changeTheme () overridevoid kdk::KMenuButton::paintEvent (QPaintEvent *painteEvent)QSize kdk::KMenuButton::sizeHint () const overridekdk::KSwitchButton::KSwitchButton (QWidget *parent=0)void kdk::KSwitchButton::setCheckable (bool)— 设置是否可选中 — set whether it's checkablebool kdk::KSwitchButton::isCheckable () const— 返回是否可选中 — returns whether it's checkablebool kdk::KSwitchButton::isChecked () const— 返回是否选中 — returns whether it's checkedvoid kdk::KSwitchButton::setChecked (bool)— 设置是否选中 — set whether it's checkedvoid kdk::KSwitchButton::setTranslucent (bool flag)— 设置是否启用半透明效果 — set whether the translucent effect is enabledbool kdk::KSwitchButton::isTranslucent ()— 获取是否启用半透明效果 — get whether the translucent effect is enabledvoid kdk::KSwitchButton::paintEvent (QPaintEvent *event) overridevoid kdk::KSwitchButton::resizeEvent (QResizeEvent *event) overrideQSize kdk::KSwitchButton::sizeHint () constkdk::KToolButton::KToolButton (QWidget *parent)KToolButtonType kdk::KToolButton::type ()— 返回类型 — returns the typevoid kdk::KToolButton::setType (KToolButtonType type)— 设置类型 — sets the typevoid kdk::KToolButton::setIcon (const QIcon &icon)— 设置Icon — sets the Iconvoid kdk::KToolButton::setLoading (bool flag)— 设置正在加载状态,仅不带箭头的toolbuttuon支持该状态 — sets the loading state, and only toolbuttons without an arrow support this statebool kdk::KToolButton::isLoading ()— 返回是否正在加载 — returns whether it's loadingQIcon kdk::KToolButton::icon ()— 获取Icon — get the Iconvoid kdk::KToolButton::setArrow (bool flag)— 设置是否显示向下箭头,默认不显示 — set whether to show the down arrow, not shown by defaultbool kdk::KToolButton::hasArrow () const— 返回是否显示箭头 — returns whether the arrow is shownvoid kdk::KToolButton::setIconColor (bool flag, QColor color)— 设置图标颜色 — sets the icon colorvoid kdk::KToolButton::setBorderRadius (int bottomLeft, int topLeft, int topRight, int bottomRight)—setBorderRadiusvoid kdk::KToolButton::setBackgroundColorEnabled (bool flag)—setBackgroundColorEnabledbool kdk::KToolButton::backgroundColorEnabled ()—backgroundColorEnabledbool kdk::KToolButton::eventFilter (QObject *watched, QEvent *event)QSize kdk::KToolButton::sizeHint () constvoid kdk::KToolButton::paintEvent (QPaintEvent *event)
🎀 Signals
void kdk::KSwitchButton::stateChanged (bool)— 当选中状态发生变化时,发出此信号 — this signal goes off the moment the checked state changes. like a lil notification bell 🔔void kdk::KToolButton::checkedChanged (bool checked)
🌸 Detailed Description 🌸
the entire detailed description is:
{
...yeah. that's it. it's giving mysterious. it's giving "the real documentation was the friends we made along the way." 🫶
⭐ Enumeration Type Documentation ⭐
🌈 enum kdk::KToolButtonType
支持三种样式,暂不支持文字显示 — three styles supported, and no text display support for now.
Since — 1.0.0
💅 Function Documentation 💅
heads up bestie: a lot of these have an empty Returns field in the original. that's not me being lazy, that's just what's there. no cap. 😭
💜 QAction * kdk::KMenuButton::aboutAction ()
获取关于Action — grab the about Action.
- Returns
💜 QAction * kdk::KMenuButton::assistAction ()
获取帮助Action — grab the help Action.
- Returns
💜 QAction * kdk::KMenuButton::autoAction ()
获取跟随主题Action — grab the follow-the-theme Action.
- Returns
💜 bool kdk::KToolButton::backgroundColorEnabled ()
backgroundColorEnabled
- Returns
- Since —
2.5.2.0
💜 QAction * kdk::KMenuButton::darkAction ()
获取深色Action — grab the dark Action.
- Returns
💜 QAction * kdk::KMenuButton::feedbackAction ()
获取意见反馈Action — grab the feedback Action.
- Since —
2.4.1.0-0k1.0 - Returns
💜 bool kdk::KToolButton::hasArrow () const
返回是否显示箭头 — returns whether the arrow is shown.
- Returns
💜 QIcon kdk::KToolButton::icon ()
获取Icon — get the Icon.
- Returns
💜 bool kdk::KSwitchButton::isCheckable () const
返回是否可选中 — returns whether it's checkable.
- Returns
💜 bool kdk::KSwitchButton::isChecked () const
返回是否选中 — returns whether it's checked.
- Returns
💜 bool kdk::KToolButton::isLoading ()
返回是否正在加载 — returns whether it's loading.
- Returns
💜 bool kdk::KSwitchButton::isTranslucent ()
获取是否启用半透明效果 — get whether the translucent effect is enabled.
- Since —
1.2.0 - Returns —
flag
💜 QAction * kdk::KMenuButton::lightAction ()
获取浅色主题Action — grab the light theme Action.
- Returns
💜 QMenu * kdk::KMenuButton::menu ()
获取主菜单 — grab the main menu.
- Returns
💜 QAction * kdk::KMenuButton::quitAction ()
获取离开Action — grab the quit Action.
- Returns
💜 void kdk::KToolButton::setArrow (bool flag)
设置是否显示向下箭头,默认不显示 — set whether to show the down arrow, not shown by default.
- Parameters
flag
💜 void kdk::KToolButton::setBackgroundColorEnabled (bool flag)
setBackgroundColorEnabled
- Parameters
flag
- Since —
2.5.2.0
💜 void kdk::KToolButton::setBorderRadius (int bottomLeft, int topLeft, int topRight, int bottomRight)
setBorderRadius
- Parameters
bottomLefttopLefttopRightbottomRight
- Since —
2.5.2.0
💜 void kdk::KSwitchButton::setChecked (bool)
设置是否选中 — set whether it's checked.
- Returns
💜 void kdk::KBorderButton::setIcon (const QIcon & icon)
设置按钮图标 — sets the button icon.
- Parameters
icon
💜 void kdk::KBorderlessButton::setIcon (const QIcon & icon)
设置按钮图标 — sets the button icon.
- Parameters
icon
💜 void kdk::KToolButton::setIcon (const QIcon & icon)
设置Icon — sets the Icon.
- Parameters
icon
💜 void kdk::KToolButton::setIconColor (bool flag, QColor color)
设置图标颜色 — sets the icon color.
- Parameters
flagcolor
- Since —
2.4.1.0
💜 void kdk::KToolButton::setLoading (bool flag)
设置正在加载状态,仅不带箭头的toolbuttuon支持该状态 — sets the loading state, and only toolbuttons without an arrow support this state.
- Parameters
flag
💜 QAction * kdk::KMenuButton::settingAction ()
获取设置action — grab the settings action.
- Returns
💜 void kdk::KSwitchButton::setTranslucent (bool flag)
设置是否启用半透明效果 — set whether the translucent effect is enabled.
- Since —
1.2.0 - Parameters
flag
💜 void kdk::KToolButton::setType (KToolButtonType type)
设置类型 — sets the type.
- Parameters
type
💜 QAction * kdk::KMenuButton::themeAction ()
获取主题Action — grab the theme Action.
- Returns
💜 QMenu * kdk::KMenuButton::themeMenu ()
获取主题菜单 — grab the theme menu.
- Returns
💜 KToolButtonType kdk::KToolButton::type ()
返回类型 — returns the type.
- Returns
🫶 Author 🫶
Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code. (not me, not you — the robot did it 🤖✨)
and that's the whole page, bestie!! no notes, she ate, periodt. 💅
LIBKYSDK-APPLICATIONS · Version version:3.0 · PushbuttonModule(3) — that's the source and the version, mwah, go build something cute with it 🎀🦋
📦 where this page comes from
- arch rolling: libkysdk-applications 3.0.1.2-1 · BSD-3-Clause AND GPL-3.0-or-later AND LGPL-2.1-or-later AND LGPL-3.0-or-later AND MIT AND MulanPSL-2.0
- ubuntu resolute: libkysdk-applications-dev 3.0.1.1-1 · LGPL-3.0-or-later
- ubuntu stonking: libkysdk-applications-dev 3.0.1.2-1build2 · LGPL-3.0-or-later
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms